mirror of
https://github.com/reactos/reactos.git
synced 2025-07-31 19:31:45 +00:00
[CMD]
Yet again some whitespace fixes. svn path=/trunk/; revision=59396
This commit is contained in:
parent
67152105b1
commit
523f0d4f97
23 changed files with 286 additions and 288 deletions
|
@ -32,7 +32,7 @@ PrintAssociation(LPTSTR extension)
|
|||
|
||||
return_val = RegOpenKeyEx(HKEY_LOCAL_MACHINE, _T("SOFTWARE\\Classes"), 0, KEY_READ, &hKey);
|
||||
|
||||
if(return_val != ERROR_SUCCESS)
|
||||
if (return_val != ERROR_SUCCESS)
|
||||
{
|
||||
RegCloseKey(hKey);
|
||||
return -1;
|
||||
|
@ -40,7 +40,7 @@ PrintAssociation(LPTSTR extension)
|
|||
|
||||
return_val = RegOpenKeyEx(hKey, extension, 0, KEY_READ, &hInsideKey);
|
||||
|
||||
if(return_val != ERROR_SUCCESS)
|
||||
if (return_val != ERROR_SUCCESS)
|
||||
{
|
||||
RegCloseKey(hKey);
|
||||
RegCloseKey(hInsideKey);
|
||||
|
@ -50,14 +50,14 @@ PrintAssociation(LPTSTR extension)
|
|||
/* obtain string length */
|
||||
return_val = RegQueryValueEx(hInsideKey, NULL, NULL, NULL, NULL, &fileTypeLength);
|
||||
|
||||
if(return_val == ERROR_FILE_NOT_FOUND) /* no default value, don't display */
|
||||
if (return_val == ERROR_FILE_NOT_FOUND) /* no default value, don't display */
|
||||
{
|
||||
RegCloseKey(hInsideKey);
|
||||
RegCloseKey(hKey);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if(return_val != ERROR_SUCCESS)
|
||||
if (return_val != ERROR_SUCCESS)
|
||||
{
|
||||
RegCloseKey(hInsideKey);
|
||||
RegCloseKey(hKey);
|
||||
|
@ -72,18 +72,18 @@ PrintAssociation(LPTSTR extension)
|
|||
RegCloseKey(hInsideKey);
|
||||
RegCloseKey(hKey);
|
||||
|
||||
if(return_val != ERROR_SUCCESS)
|
||||
if (return_val != ERROR_SUCCESS)
|
||||
{
|
||||
cmd_free(fileType);
|
||||
return -2;
|
||||
}
|
||||
|
||||
if(fileTypeLength != 0) /* if there is a default key, display relevant information */
|
||||
if (fileTypeLength != 0) /* if there is a default key, display relevant information */
|
||||
{
|
||||
ConOutPrintf(_T("%s=%s\r\n"), extension, fileType);
|
||||
}
|
||||
|
||||
if(fileTypeLength)
|
||||
if (fileTypeLength)
|
||||
cmd_free(fileType);
|
||||
|
||||
return 1;
|
||||
|
@ -102,7 +102,7 @@ PrintAllAssociations()
|
|||
|
||||
return_val = RegOpenKeyEx(HKEY_LOCAL_MACHINE, _T("SOFTWARE\\Classes"), 0, KEY_READ, &hKey);
|
||||
|
||||
if(return_val != ERROR_SUCCESS)
|
||||
if (return_val != ERROR_SUCCESS)
|
||||
{
|
||||
RegCloseKey(hKey);
|
||||
return -1;
|
||||
|
@ -110,7 +110,7 @@ PrintAllAssociations()
|
|||
|
||||
return_val = RegQueryInfoKey(hKey, NULL, NULL, NULL, &numKeys, &extLength, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
|
||||
if(return_val != ERROR_SUCCESS)
|
||||
if (return_val != ERROR_SUCCESS)
|
||||
{
|
||||
RegCloseKey(hKey);
|
||||
return -2;
|
||||
|
@ -123,9 +123,9 @@ PrintAllAssociations()
|
|||
DWORD buffer_size = extLength;
|
||||
return_val = RegEnumKeyEx(hKey, keyCtr, extName, &buffer_size, NULL, NULL, NULL, NULL);
|
||||
|
||||
if(return_val == ERROR_SUCCESS || return_val == ERROR_MORE_DATA)
|
||||
if (return_val == ERROR_SUCCESS || return_val == ERROR_MORE_DATA)
|
||||
{
|
||||
if(*extName == _T('.'))
|
||||
if (*extName == _T('.'))
|
||||
PrintAssociation(extName);
|
||||
}
|
||||
else
|
||||
|
@ -138,7 +138,7 @@ PrintAllAssociations()
|
|||
|
||||
RegCloseKey(hKey);
|
||||
|
||||
if(extName)
|
||||
if (extName)
|
||||
cmd_free(extName);
|
||||
|
||||
return numKeys;
|
||||
|
@ -152,12 +152,12 @@ AddAssociation(LPTSTR extension, LPTSTR type)
|
|||
|
||||
return_val = RegOpenKeyEx(HKEY_LOCAL_MACHINE, _T("SOFTWARE\\Classes"), 0, KEY_ALL_ACCESS, &hKey);
|
||||
|
||||
if(return_val != ERROR_SUCCESS)
|
||||
if (return_val != ERROR_SUCCESS)
|
||||
return -1;
|
||||
|
||||
return_val = RegCreateKeyEx(hKey, extension, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &insideKey, NULL);
|
||||
|
||||
if(return_val != ERROR_SUCCESS)
|
||||
if (return_val != ERROR_SUCCESS)
|
||||
{
|
||||
RegCloseKey(hKey);
|
||||
return -1;
|
||||
|
@ -165,7 +165,7 @@ AddAssociation(LPTSTR extension, LPTSTR type)
|
|||
|
||||
return_val = RegSetValueEx(insideKey, NULL, 0, REG_SZ, (LPBYTE)type, (_tcslen(type) + 1) * sizeof(TCHAR));
|
||||
|
||||
if(return_val != ERROR_SUCCESS)
|
||||
if (return_val != ERROR_SUCCESS)
|
||||
{
|
||||
RegCloseKey(insideKey);
|
||||
RegCloseKey(hKey);
|
||||
|
@ -186,12 +186,12 @@ RemoveAssociation(LPTSTR extension)
|
|||
|
||||
return_val = RegOpenKeyEx(HKEY_LOCAL_MACHINE, _T("SOFTWARE\\Classes"), 0, KEY_ALL_ACCESS, &hKey);
|
||||
|
||||
if(return_val != ERROR_SUCCESS)
|
||||
if (return_val != ERROR_SUCCESS)
|
||||
return -1;
|
||||
|
||||
return_val = RegDeleteKey(hKey, extension);
|
||||
|
||||
if(return_val != ERROR_SUCCESS)
|
||||
if (return_val != ERROR_SUCCESS)
|
||||
{
|
||||
RegCloseKey(hKey);
|
||||
return -2;
|
||||
|
@ -214,12 +214,12 @@ INT CommandAssoc (LPTSTR param)
|
|||
|
||||
nErrorLevel = 0;
|
||||
|
||||
if(_tcslen(param) == 0)
|
||||
if (_tcslen(param) == 0)
|
||||
PrintAllAssociations();
|
||||
else
|
||||
{
|
||||
LPTSTR lpEqualSign = _tcschr(param, _T('='));
|
||||
if(lpEqualSign != NULL)
|
||||
if (lpEqualSign != NULL)
|
||||
{
|
||||
LPTSTR fileType = lpEqualSign + 1;
|
||||
LPTSTR extension = cmd_alloc((lpEqualSign - param + 1) * sizeof(TCHAR));
|
||||
|
@ -227,7 +227,7 @@ INT CommandAssoc (LPTSTR param)
|
|||
_tcsncpy(extension, param, lpEqualSign - param);
|
||||
extension[lpEqualSign - param] = (TCHAR)0;
|
||||
|
||||
if(_tcslen(fileType) == 0)
|
||||
if (_tcslen(fileType) == 0)
|
||||
/* if the equal sign is the last character
|
||||
in the string, then delete the key */
|
||||
{
|
||||
|
@ -247,7 +247,7 @@ INT CommandAssoc (LPTSTR param)
|
|||
/* no equal sign, print all associations */
|
||||
INT retval = PrintAssociation(param);
|
||||
|
||||
if(retval == 0) /* if nothing printed out */
|
||||
if (retval == 0) /* if nothing printed out */
|
||||
ConOutResPrintf(STRING_ASSOC_ERROR, param);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -230,7 +230,7 @@ CommandChoice (LPTSTR param)
|
|||
|
||||
ConInFlush ();
|
||||
|
||||
if(!bTimeout)
|
||||
if (!bTimeout)
|
||||
{
|
||||
while (TRUE)
|
||||
{
|
||||
|
|
|
@ -310,7 +310,7 @@ HANDLE RunFile(DWORD flags, LPTSTR filename, LPTSTR params,
|
|||
* Rest - rest of command line
|
||||
*/
|
||||
static INT
|
||||
Execute (LPTSTR Full, LPTSTR First, LPTSTR Rest, PARSED_COMMAND *Cmd)
|
||||
Execute(LPTSTR Full, LPTSTR First, LPTSTR Rest, PARSED_COMMAND *Cmd)
|
||||
{
|
||||
TCHAR szFullName[MAX_PATH];
|
||||
TCHAR *first, *rest, *dot;
|
||||
|
@ -415,8 +415,8 @@ Execute (LPTSTR Full, LPTSTR First, LPTSTR Rest, PARSED_COMMAND *Cmd)
|
|||
stui.wShowWindow = SW_SHOWDEFAULT;
|
||||
|
||||
// return console to standard mode
|
||||
SetConsoleMode (GetStdHandle(STD_INPUT_HANDLE),
|
||||
ENABLE_LINE_INPUT | ENABLE_PROCESSED_INPUT | ENABLE_ECHO_INPUT );
|
||||
SetConsoleMode(GetStdHandle(STD_INPUT_HANDLE),
|
||||
ENABLE_LINE_INPUT | ENABLE_PROCESSED_INPUT | ENABLE_ECHO_INPUT);
|
||||
|
||||
if (CreateProcess (szFullName,
|
||||
szFullCmdLine,
|
||||
|
@ -1439,7 +1439,7 @@ BOOL WINAPI BreakHandler (DWORD dwCtrlType)
|
|||
}
|
||||
else
|
||||
{
|
||||
if(SelfGenerated)
|
||||
if (SelfGenerated)
|
||||
{
|
||||
SelfGenerated = FALSE;
|
||||
return TRUE;
|
||||
|
@ -1539,7 +1539,7 @@ ExecuteAutoRunFile(HKEY hkeyRoot)
|
|||
KEY_READ,
|
||||
&hkey) == ERROR_SUCCESS)
|
||||
{
|
||||
if(RegQueryValueEx(hkey,
|
||||
if (RegQueryValueEx(hkey,
|
||||
_T("AutoRun"),
|
||||
0,
|
||||
0,
|
||||
|
|
|
@ -112,7 +112,7 @@ static BOOL bInsert = TRUE;
|
|||
|
||||
|
||||
static VOID
|
||||
ClearCommandLine (LPTSTR str, INT maxlen, SHORT orgx, SHORT orgy)
|
||||
ClearCommandLine(LPTSTR str, INT maxlen, SHORT orgx, SHORT orgy)
|
||||
{
|
||||
INT count;
|
||||
|
||||
|
@ -125,7 +125,7 @@ ClearCommandLine (LPTSTR str, INT maxlen, SHORT orgx, SHORT orgy)
|
|||
|
||||
|
||||
/* read in a command line */
|
||||
BOOL ReadCommand (LPTSTR str, INT maxlen)
|
||||
BOOL ReadCommand(LPTSTR str, INT maxlen)
|
||||
{
|
||||
CONSOLE_SCREEN_BUFFER_INFO csbi;
|
||||
SHORT orgx; /* origin x/y */
|
||||
|
@ -182,9 +182,7 @@ BOOL ReadCommand (LPTSTR str, INT maxlen)
|
|||
|
||||
do
|
||||
{
|
||||
|
||||
bReturn = FALSE;
|
||||
|
||||
ConInKey (&ir);
|
||||
|
||||
if (ir.Event.KeyEvent.dwControlKeyState &
|
||||
|
@ -360,21 +358,21 @@ BOOL ReadCommand (LPTSTR str, INT maxlen)
|
|||
/*if second TAB, list matches*/
|
||||
if (ShowCompletionMatches (str, charcount))
|
||||
{
|
||||
PrintPrompt ();
|
||||
GetCursorXY (&orgx, &orgy);
|
||||
ConOutPrintf (_T("%s"), str);
|
||||
PrintPrompt();
|
||||
GetCursorXY(&orgx, &orgy);
|
||||
ConOutPrintf(_T("%s"), str);
|
||||
|
||||
/* set cursor position */
|
||||
SetCursorXY ((orgx + current) % maxx,
|
||||
orgy + (orgx + current) / maxx);
|
||||
GetCursorXY (&curx, &cury);
|
||||
SetCursorXY((orgx + current) % maxx,
|
||||
orgy + (orgx + current) / maxx);
|
||||
GetCursorXY(&curx, &cury);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBeep (-1);
|
||||
MessageBeep(-1);
|
||||
}
|
||||
#endif
|
||||
#ifdef FEATURE_4NT_FILENAME_COMPLETION
|
||||
|
@ -396,24 +394,24 @@ BOOL ReadCommand (LPTSTR str, INT maxlen)
|
|||
_tcscpy(str,szPath);
|
||||
|
||||
/* Figure out where cusor is going to be after we print it */
|
||||
charcount = _tcslen (str);
|
||||
charcount = _tcslen(str);
|
||||
current = charcount;
|
||||
|
||||
SetCursorXY (orgx, orgy);
|
||||
SetCursorXY(orgx, orgy);
|
||||
/* Print out what we have now */
|
||||
ConOutPrintf (_T("%s"), str);
|
||||
ConOutPrintf(_T("%s"), str);
|
||||
|
||||
/* Move cursor accordingly */
|
||||
if(tempscreen > charcount)
|
||||
if (tempscreen > charcount)
|
||||
{
|
||||
GetCursorXY (&curx, &cury);
|
||||
GetCursorXY(&curx, &cury);
|
||||
for(count = tempscreen - charcount; count--; )
|
||||
ConOutChar (_T(' '));
|
||||
SetCursorXY (curx, cury);
|
||||
ConOutChar(_T(' '));
|
||||
SetCursorXY(curx, cury);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(((charcount + orgx) / maxx) + orgy > maxy - 1)
|
||||
if (((charcount + orgx) / maxx) + orgy > maxy - 1)
|
||||
orgy += maxy - ((charcount + orgx) / maxx + orgy + 1);
|
||||
}
|
||||
SetCursorXY((short)(((int)orgx + current) % maxx), (short)((int)orgy + ((int)orgx + current) / maxx));
|
||||
|
@ -425,7 +423,7 @@ BOOL ReadCommand (LPTSTR str, INT maxlen)
|
|||
case _T('C'):
|
||||
/* ^M does the same as return */
|
||||
bCharInput = TRUE;
|
||||
if(!(ir.Event.KeyEvent.dwControlKeyState &
|
||||
if (!(ir.Event.KeyEvent.dwControlKeyState &
|
||||
(RIGHT_CTRL_PRESSED|LEFT_CTRL_PRESSED)))
|
||||
{
|
||||
break;
|
||||
|
|
|
@ -26,37 +26,37 @@ UINT InputCodePage;
|
|||
UINT OutputCodePage;
|
||||
|
||||
|
||||
VOID ConInDisable (VOID)
|
||||
VOID ConInDisable(VOID)
|
||||
{
|
||||
HANDLE hInput = GetStdHandle (STD_INPUT_HANDLE);
|
||||
HANDLE hInput = GetStdHandle(STD_INPUT_HANDLE);
|
||||
DWORD dwMode;
|
||||
|
||||
GetConsoleMode (hInput, &dwMode);
|
||||
GetConsoleMode(hInput, &dwMode);
|
||||
dwMode &= ~ENABLE_PROCESSED_INPUT;
|
||||
SetConsoleMode (hInput, dwMode);
|
||||
SetConsoleMode(hInput, dwMode);
|
||||
}
|
||||
|
||||
|
||||
VOID ConInEnable (VOID)
|
||||
VOID ConInEnable(VOID)
|
||||
{
|
||||
HANDLE hInput = GetStdHandle (STD_INPUT_HANDLE);
|
||||
HANDLE hInput = GetStdHandle(STD_INPUT_HANDLE);
|
||||
DWORD dwMode;
|
||||
|
||||
GetConsoleMode (hInput, &dwMode);
|
||||
GetConsoleMode(hInput, &dwMode);
|
||||
dwMode |= ENABLE_PROCESSED_INPUT;
|
||||
SetConsoleMode (hInput, dwMode);
|
||||
SetConsoleMode(hInput, dwMode);
|
||||
}
|
||||
|
||||
|
||||
VOID ConInFlush (VOID)
|
||||
{
|
||||
FlushConsoleInputBuffer (GetStdHandle (STD_INPUT_HANDLE));
|
||||
FlushConsoleInputBuffer(GetStdHandle(STD_INPUT_HANDLE));
|
||||
}
|
||||
|
||||
|
||||
VOID ConInKey (PINPUT_RECORD lpBuffer)
|
||||
VOID ConInKey(PINPUT_RECORD lpBuffer)
|
||||
{
|
||||
HANDLE hInput = GetStdHandle (STD_INPUT_HANDLE);
|
||||
HANDLE hInput = GetStdHandle(STD_INPUT_HANDLE);
|
||||
DWORD dwRead;
|
||||
|
||||
if (hInput == INVALID_HANDLE_VALUE)
|
||||
|
@ -64,7 +64,7 @@ VOID ConInKey (PINPUT_RECORD lpBuffer)
|
|||
|
||||
do
|
||||
{
|
||||
ReadConsoleInput (hInput, lpBuffer, 1, &dwRead);
|
||||
ReadConsoleInput(hInput, lpBuffer, 1, &dwRead);
|
||||
if ((lpBuffer->EventType == KEY_EVENT) &&
|
||||
(lpBuffer->Event.KeyEvent.bKeyDown == TRUE))
|
||||
break;
|
||||
|
@ -73,7 +73,7 @@ VOID ConInKey (PINPUT_RECORD lpBuffer)
|
|||
}
|
||||
|
||||
|
||||
VOID ConInString (LPTSTR lpInput, DWORD dwLength)
|
||||
VOID ConInString(LPTSTR lpInput, DWORD dwLength)
|
||||
{
|
||||
DWORD dwOldMode;
|
||||
DWORD dwRead = 0;
|
||||
|
@ -87,13 +87,13 @@ VOID ConInString (LPTSTR lpInput, DWORD dwLength)
|
|||
#else
|
||||
pBuf = lpInput;
|
||||
#endif
|
||||
ZeroMemory (lpInput, dwLength * sizeof(TCHAR));
|
||||
hFile = GetStdHandle (STD_INPUT_HANDLE);
|
||||
GetConsoleMode (hFile, &dwOldMode);
|
||||
ZeroMemory(lpInput, dwLength * sizeof(TCHAR));
|
||||
hFile = GetStdHandle(STD_INPUT_HANDLE);
|
||||
GetConsoleMode(hFile, &dwOldMode);
|
||||
|
||||
SetConsoleMode (hFile, ENABLE_LINE_INPUT | ENABLE_ECHO_INPUT);
|
||||
SetConsoleMode(hFile, ENABLE_LINE_INPUT | ENABLE_ECHO_INPUT);
|
||||
|
||||
ReadFile (hFile, (PVOID)pBuf, dwLength - 1, &dwRead, NULL);
|
||||
ReadFile(hFile, (PVOID)pBuf, dwLength - 1, &dwRead, NULL);
|
||||
|
||||
#ifdef _UNICODE
|
||||
MultiByteToWideChar(InputCodePage, 0, pBuf, dwRead, lpInput, dwLength - 1);
|
||||
|
@ -108,7 +108,7 @@ VOID ConInString (LPTSTR lpInput, DWORD dwLength)
|
|||
}
|
||||
}
|
||||
|
||||
SetConsoleMode (hFile, dwOldMode);
|
||||
SetConsoleMode(hFile, dwOldMode);
|
||||
}
|
||||
|
||||
static VOID ConWrite(TCHAR *str, DWORD len, DWORD nStdHandle)
|
||||
|
@ -213,7 +213,7 @@ INT ConPrintfPaging(BOOL NewPage, LPTSTR szFormat, va_list arg_ptr, DWORD nStdHa
|
|||
|
||||
int from = 0, i = 0;
|
||||
|
||||
if(NewPage == TRUE)
|
||||
if (NewPage == TRUE)
|
||||
LineCount = 0;
|
||||
|
||||
/* rest LineCount and return if no string have been given */
|
||||
|
@ -233,7 +233,7 @@ INT ConPrintfPaging(BOOL NewPage, LPTSTR szFormat, va_list arg_ptr, DWORD nStdHa
|
|||
CharSL = csbi.dwCursorPosition.X;
|
||||
|
||||
//make sure they didnt make the screen to small
|
||||
if(ScreenLines<4)
|
||||
if (ScreenLines<4)
|
||||
{
|
||||
ConPrintf(szFormat, arg_ptr, nStdHandle);
|
||||
return 0;
|
||||
|
@ -250,12 +250,12 @@ INT ConPrintfPaging(BOOL NewPage, LPTSTR szFormat, va_list arg_ptr, DWORD nStdHa
|
|||
LineCount++;
|
||||
CharSL=0;
|
||||
|
||||
if(LineCount >= ScreenLines)
|
||||
if (LineCount >= ScreenLines)
|
||||
{
|
||||
WriteConsole(hOutput, &szOut[from], i-from, &dwWritten, NULL);
|
||||
from = i;
|
||||
|
||||
if(PagePrompt() != PROMPT_YES)
|
||||
if (PagePrompt() != PROMPT_YES)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
@ -286,7 +286,7 @@ VOID ConErrFormatMessage (DWORD MessageId, ...)
|
|||
&arg_ptr);
|
||||
|
||||
va_end (arg_ptr);
|
||||
if(ret > 0)
|
||||
if (ret > 0)
|
||||
{
|
||||
ConErrPuts (text);
|
||||
LocalFree(text);
|
||||
|
@ -315,7 +315,7 @@ VOID ConOutFormatMessage (DWORD MessageId, ...)
|
|||
&arg_ptr);
|
||||
|
||||
va_end (arg_ptr);
|
||||
if(ret > 0)
|
||||
if (ret > 0)
|
||||
{
|
||||
ConErrPuts (text);
|
||||
LocalFree(text);
|
||||
|
|
|
@ -68,12 +68,12 @@ copy(TCHAR source[MAX_PATH],
|
|||
SYSTEMTIME CurrentTime;
|
||||
|
||||
/* Check Breaker */
|
||||
if(CheckCtrlBreak(BREAK_INPUT))
|
||||
if (CheckCtrlBreak(BREAK_INPUT))
|
||||
return 0;
|
||||
|
||||
TRACE ("checking mode\n");
|
||||
|
||||
if(bTouch)
|
||||
if (bTouch)
|
||||
{
|
||||
hFileSrc = CreateFile (source, GENERIC_WRITE, FILE_SHARE_READ,
|
||||
NULL, OPEN_EXISTING, 0, NULL);
|
||||
|
@ -86,7 +86,7 @@ copy(TCHAR source[MAX_PATH],
|
|||
|
||||
GetSystemTime(&CurrentTime);
|
||||
SystemTimeToFileTime(&CurrentTime, &NewFileTime);
|
||||
if(SetFileTime(hFileSrc,(LPFILETIME) NULL, (LPFILETIME) NULL, &NewFileTime))
|
||||
if (SetFileTime(hFileSrc,(LPFILETIME) NULL, (LPFILETIME) NULL, &NewFileTime))
|
||||
{
|
||||
CloseHandle(hFileSrc);
|
||||
nErrorLevel = 1;
|
||||
|
@ -120,7 +120,7 @@ copy(TCHAR source[MAX_PATH],
|
|||
|
||||
/* Check to see if /D or /Z are true, if so we need a middle
|
||||
man to copy the file too to allow us to use CopyFileEx later */
|
||||
if(lpdwFlags & COPY_DECRYPT)
|
||||
if (lpdwFlags & COPY_DECRYPT)
|
||||
{
|
||||
GetEnvironmentVariable(_T("TEMP"),TempSrc,MAX_PATH);
|
||||
_tcscat(TempSrc,_T("\\"));
|
||||
|
@ -134,7 +134,7 @@ copy(TCHAR source[MAX_PATH],
|
|||
which would error when it tried to open the handles for ReadFile
|
||||
and WriteFile */
|
||||
_tcscat(TempSrc,_T(".decrypt"));
|
||||
if(!CopyFileEx(source, TempSrc, NULL, NULL, FALSE, COPY_FILE_ALLOW_DECRYPTED_DESTINATION))
|
||||
if (!CopyFileEx(source, TempSrc, NULL, NULL, FALSE, COPY_FILE_ALLOW_DECRYPTED_DESTINATION))
|
||||
{
|
||||
nErrorLevel = 1;
|
||||
return 0;
|
||||
|
@ -143,7 +143,7 @@ copy(TCHAR source[MAX_PATH],
|
|||
}
|
||||
|
||||
|
||||
if(lpdwFlags & COPY_RESTART)
|
||||
if (lpdwFlags & COPY_RESTART)
|
||||
{
|
||||
_tcscpy(TrueDest, dest);
|
||||
GetEnvironmentVariable(_T("TEMP"),dest,MAX_PATH);
|
||||
|
@ -260,9 +260,9 @@ copy(TCHAR source[MAX_PATH],
|
|||
SetFileAttributes (dest, dwAttrib);
|
||||
|
||||
/* Now finish off the copy if needed with CopyFileEx */
|
||||
if(lpdwFlags & COPY_RESTART)
|
||||
if (lpdwFlags & COPY_RESTART)
|
||||
{
|
||||
if(!CopyFileEx(dest, TrueDest, NULL, NULL, FALSE, COPY_FILE_RESTARTABLE))
|
||||
if (!CopyFileEx(dest, TrueDest, NULL, NULL, FALSE, COPY_FILE_RESTARTABLE))
|
||||
{
|
||||
nErrorLevel = 1;
|
||||
DeleteFile(dest);
|
||||
|
@ -273,7 +273,7 @@ copy(TCHAR source[MAX_PATH],
|
|||
|
||||
}
|
||||
|
||||
if(lpdwFlags & COPY_DECRYPT)
|
||||
if (lpdwFlags & COPY_DECRYPT)
|
||||
DeleteFile(TempSrc);
|
||||
|
||||
return 1;
|
||||
|
@ -480,8 +480,8 @@ INT cmd_copy(LPTSTR param)
|
|||
break;
|
||||
|
||||
case _T('-'):
|
||||
if(_tcslen(arg[i]) >= 3)
|
||||
if(_totupper(arg[i][2]) == _T('Y'))
|
||||
if (_tcslen(arg[i]) >= 3)
|
||||
if (_totupper(arg[i][2]) == _T('Y'))
|
||||
{
|
||||
dwFlags &= ~COPY_NO_PROMPT;
|
||||
dwFlags |= COPY_PROMPT;
|
||||
|
@ -538,7 +538,7 @@ INT cmd_copy(LPTSTR param)
|
|||
|
||||
bMoreFiles = FALSE;
|
||||
}
|
||||
else if(nDes == -1)
|
||||
else if (nDes == -1)
|
||||
{
|
||||
nDes = i;
|
||||
}
|
||||
|
@ -825,7 +825,7 @@ INT cmd_copy(LPTSTR param)
|
|||
_tcscat (tmpSrcPath, findBuffer.cFileName);
|
||||
|
||||
/* Check to see if the file is the same file */
|
||||
if(!bTouch && !_tcscmp(tmpSrcPath, tmpDestPath))
|
||||
if (!bTouch && !_tcscmp(tmpSrcPath, tmpDestPath))
|
||||
{
|
||||
ConOutResPrintf(STRING_COPY_ERROR2);
|
||||
|
||||
|
@ -846,7 +846,7 @@ INT cmd_copy(LPTSTR param)
|
|||
dwFlags |= COPY_NO_PROMPT;
|
||||
|
||||
/* Tell weather the copy was successful or not */
|
||||
if(copy(tmpSrcPath,tmpDestPath, bAppend, dwFlags, bTouch))
|
||||
if (copy(tmpSrcPath,tmpDestPath, bAppend, dwFlags, bTouch))
|
||||
{
|
||||
nFiles++;
|
||||
//LoadString(CMD_ModuleHandle, STRING_MOVE_ERROR1, szMsg, RC_STRING_MAX_SIZE);
|
||||
|
|
|
@ -372,12 +372,12 @@ DirReadParam(LPTSTR Line, /* [IN] The line with the parameters & s
|
|||
|
||||
/* Copy it to the entries list */
|
||||
temp = cmd_alloc((ptrEnd - ptrStart + 1) * sizeof (TCHAR));
|
||||
if(!temp)
|
||||
if (!temp)
|
||||
return FALSE;
|
||||
memcpy(temp, ptrStart, (ptrEnd - ptrStart) * sizeof (TCHAR));
|
||||
temp[ptrEnd - ptrStart] = _T('\0');
|
||||
StripQuotes(temp);
|
||||
if(!add_entry(entries, params, temp))
|
||||
if (!add_entry(entries, params, temp))
|
||||
{
|
||||
cmd_free(temp);
|
||||
freep(*params);
|
||||
|
@ -404,9 +404,9 @@ DirReadParam(LPTSTR Line, /* [IN] The line with the parameters & s
|
|||
switch(cCurSwitch)
|
||||
{
|
||||
case _T('A'): /* Switch parameters for /A (attributes filter) */
|
||||
if(cCurChar == _T('-'))
|
||||
if (cCurChar == _T('-'))
|
||||
bPNegative = TRUE;
|
||||
else if(cCurUChar == _T('D'))
|
||||
else if (cCurUChar == _T('D'))
|
||||
{
|
||||
lpFlags->stAttribs.dwAttribMask |= FILE_ATTRIBUTE_DIRECTORY;
|
||||
if (bPNegative)
|
||||
|
@ -414,7 +414,7 @@ DirReadParam(LPTSTR Line, /* [IN] The line with the parameters & s
|
|||
else
|
||||
lpFlags->stAttribs.dwAttribVal |= FILE_ATTRIBUTE_DIRECTORY;
|
||||
}
|
||||
else if(cCurUChar == _T('R'))
|
||||
else if (cCurUChar == _T('R'))
|
||||
{
|
||||
lpFlags->stAttribs.dwAttribMask |= FILE_ATTRIBUTE_READONLY;
|
||||
if (bPNegative)
|
||||
|
@ -422,7 +422,7 @@ DirReadParam(LPTSTR Line, /* [IN] The line with the parameters & s
|
|||
else
|
||||
lpFlags->stAttribs.dwAttribVal |= FILE_ATTRIBUTE_READONLY;
|
||||
}
|
||||
else if(cCurUChar == _T('H'))
|
||||
else if (cCurUChar == _T('H'))
|
||||
{
|
||||
lpFlags->stAttribs.dwAttribMask |= FILE_ATTRIBUTE_HIDDEN;
|
||||
if (bPNegative)
|
||||
|
@ -430,7 +430,7 @@ DirReadParam(LPTSTR Line, /* [IN] The line with the parameters & s
|
|||
else
|
||||
lpFlags->stAttribs.dwAttribVal |= FILE_ATTRIBUTE_HIDDEN;
|
||||
}
|
||||
else if(cCurUChar == _T('A'))
|
||||
else if (cCurUChar == _T('A'))
|
||||
{
|
||||
lpFlags->stAttribs.dwAttribMask |= FILE_ATTRIBUTE_ARCHIVE;
|
||||
if (bPNegative)
|
||||
|
@ -438,7 +438,7 @@ DirReadParam(LPTSTR Line, /* [IN] The line with the parameters & s
|
|||
else
|
||||
lpFlags->stAttribs.dwAttribVal |= FILE_ATTRIBUTE_ARCHIVE;
|
||||
}
|
||||
else if(cCurUChar == _T('S'))
|
||||
else if (cCurUChar == _T('S'))
|
||||
{
|
||||
lpFlags->stAttribs.dwAttribMask |= FILE_ATTRIBUTE_SYSTEM;
|
||||
if (bPNegative)
|
||||
|
@ -453,11 +453,11 @@ DirReadParam(LPTSTR Line, /* [IN] The line with the parameters & s
|
|||
}
|
||||
break;
|
||||
case _T('T'): /* Switch parameters for /T (time field) */
|
||||
if(cCurUChar == _T('C'))
|
||||
if (cCurUChar == _T('C'))
|
||||
lpFlags->stTimeField.eTimeField= TF_CREATIONDATE ;
|
||||
else if(cCurUChar == _T('A'))
|
||||
else if (cCurUChar == _T('A'))
|
||||
lpFlags->stTimeField.eTimeField= TF_LASTACCESSEDDATE ;
|
||||
else if(cCurUChar == _T('W'))
|
||||
else if (cCurUChar == _T('W'))
|
||||
lpFlags->stTimeField.eTimeField= TF_MODIFIEDDATE ;
|
||||
else
|
||||
{
|
||||
|
@ -465,37 +465,37 @@ DirReadParam(LPTSTR Line, /* [IN] The line with the parameters & s
|
|||
return FALSE;
|
||||
}
|
||||
break;
|
||||
case _T('O'): /* Switch parameters for /O (order) */
|
||||
case _T('O'): /* Switch parameters for /O (order) */
|
||||
/* Ok a switch parameter was given */
|
||||
bOrderByNoPar = FALSE;
|
||||
|
||||
if(cCurChar == _T('-'))
|
||||
if (cCurChar == _T('-'))
|
||||
bPNegative = TRUE;
|
||||
else if(cCurUChar == _T('N'))
|
||||
else if (cCurUChar == _T('N'))
|
||||
{
|
||||
if (lpFlags->stOrderBy.sCriteriaCount < 3) lpFlags->stOrderBy.sCriteriaCount++;
|
||||
lpFlags->stOrderBy.bCriteriaRev[lpFlags->stOrderBy.sCriteriaCount - 1] = bPNegative;
|
||||
lpFlags->stOrderBy.eCriteria[lpFlags->stOrderBy.sCriteriaCount - 1] = ORDER_NAME;
|
||||
}
|
||||
else if(cCurUChar == _T('S'))
|
||||
else if (cCurUChar == _T('S'))
|
||||
{
|
||||
if (lpFlags->stOrderBy.sCriteriaCount < 3) lpFlags->stOrderBy.sCriteriaCount++;
|
||||
lpFlags->stOrderBy.bCriteriaRev[lpFlags->stOrderBy.sCriteriaCount - 1] = bPNegative;
|
||||
lpFlags->stOrderBy.eCriteria[lpFlags->stOrderBy.sCriteriaCount - 1] = ORDER_SIZE;
|
||||
}
|
||||
else if(cCurUChar == _T('G'))
|
||||
else if (cCurUChar == _T('G'))
|
||||
{
|
||||
if (lpFlags->stOrderBy.sCriteriaCount < 3) lpFlags->stOrderBy.sCriteriaCount++;
|
||||
lpFlags->stOrderBy.bCriteriaRev[lpFlags->stOrderBy.sCriteriaCount - 1] = bPNegative;
|
||||
lpFlags->stOrderBy.eCriteria[lpFlags->stOrderBy.sCriteriaCount - 1] = ORDER_DIRECTORY;
|
||||
}
|
||||
else if(cCurUChar == _T('E'))
|
||||
else if (cCurUChar == _T('E'))
|
||||
{
|
||||
if (lpFlags->stOrderBy.sCriteriaCount < 3) lpFlags->stOrderBy.sCriteriaCount++;
|
||||
lpFlags->stOrderBy.bCriteriaRev[lpFlags->stOrderBy.sCriteriaCount - 1] = bPNegative;
|
||||
lpFlags->stOrderBy.eCriteria[lpFlags->stOrderBy.sCriteriaCount - 1] = ORDER_EXTENSION;
|
||||
}
|
||||
else if(cCurUChar == _T('D'))
|
||||
else if (cCurUChar == _T('D'))
|
||||
{
|
||||
if (lpFlags->stOrderBy.sCriteriaCount < 3) lpFlags->stOrderBy.sCriteriaCount++;
|
||||
lpFlags->stOrderBy.bCriteriaRev[lpFlags->stOrderBy.sCriteriaCount - 1] = bPNegative;
|
||||
|
@ -1111,12 +1111,12 @@ DirPrintFiles(LPWIN32_FIND_DATA ptrFiles[], /* [IN] Files' Info */
|
|||
/* Bare format */
|
||||
DirPrintBareList(ptrFiles, dwCount, szCurPath, lpFlags);
|
||||
}
|
||||
else if(lpFlags->bShortName)
|
||||
else if (lpFlags->bShortName)
|
||||
{
|
||||
/* New list style / Short names */
|
||||
DirPrintNewList(ptrFiles, dwCount, szCurPath, lpFlags);
|
||||
}
|
||||
else if(lpFlags->bWideListColSort || lpFlags->bWideList)
|
||||
else if (lpFlags->bWideListColSort || lpFlags->bWideList)
|
||||
{
|
||||
/* Wide list */
|
||||
DirPrintWideList(ptrFiles, dwCount, szCurPath, lpFlags);
|
||||
|
@ -1348,7 +1348,7 @@ DirList(LPTSTR szPath, /* [IN] The path that dir starts */
|
|||
do
|
||||
{
|
||||
/*If retrieved FileName has extension,and szPath doesnt have extension then JUMP the retrieved FileName*/
|
||||
if(_tcschr(wfdFileInfo.cFileName,_T('.'))&&(fPoint==TRUE))
|
||||
if (_tcschr(wfdFileInfo.cFileName,_T('.'))&&(fPoint==TRUE))
|
||||
{
|
||||
continue;
|
||||
/* Here we filter all the specified attributes */
|
||||
|
|
|
@ -47,7 +47,7 @@ VOID ErrorMessage (DWORD dwErrorCode, LPTSTR szFormat, ...)
|
|||
(LPTSTR)&szError, 0, NULL))
|
||||
{
|
||||
ConErrPrintf (_T("%s %s\n"), szError, szMessage);
|
||||
if(szError)
|
||||
if (szError)
|
||||
LocalFree (szError);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -169,7 +169,7 @@ VOID CompleteFilename (LPTSTR str, UINT charcount)
|
|||
_tcscat (&str[start], maxmatch);
|
||||
}
|
||||
|
||||
if(!perfectmatch)
|
||||
if (!perfectmatch)
|
||||
{
|
||||
MessageBeep (-1);
|
||||
}
|
||||
|
@ -381,12 +381,12 @@ VOID FindPrefixAndSuffix(LPTSTR strIN, LPTSTR szPrefix, LPTSTR szSuffix)
|
|||
/* Count number of " */
|
||||
for(i = 0; i < _tcslen(str); i++)
|
||||
{
|
||||
if(str[i] == _T('\"'))
|
||||
if (str[i] == _T('\"'))
|
||||
nQuotes++;
|
||||
}
|
||||
|
||||
/* Find the prefix and suffix */
|
||||
if(nQuotes % 2 && nQuotes >= 1)
|
||||
if (nQuotes % 2 && nQuotes >= 1)
|
||||
{
|
||||
/* Odd number of quotes. Just start from the last " */
|
||||
/* THis is the way MS does it, and is an easy way out */
|
||||
|
@ -398,9 +398,9 @@ VOID FindPrefixAndSuffix(LPTSTR strIN, LPTSTR szPrefix, LPTSTR szSuffix)
|
|||
szSearch1 = _tcsrchr(str, _T('\"'));
|
||||
szSearch2 = _tcsrchr(str, _T('\\'));
|
||||
szSearch3 = _tcsrchr(str, _T('.'));
|
||||
if(szSearch2 != NULL && _tcslen(szSearch1) > _tcslen(szSearch2))
|
||||
if (szSearch2 != NULL && _tcslen(szSearch1) > _tcslen(szSearch2))
|
||||
szSearch = szSearch2;
|
||||
else if(szSearch3 != NULL && _tcslen(szSearch1) > _tcslen(szSearch3))
|
||||
else if (szSearch3 != NULL && _tcslen(szSearch1) > _tcslen(szSearch3))
|
||||
szSearch = szSearch3;
|
||||
else
|
||||
szSearch = szSearch1;
|
||||
|
@ -412,13 +412,13 @@ VOID FindPrefixAndSuffix(LPTSTR strIN, LPTSTR szPrefix, LPTSTR szSuffix)
|
|||
|
||||
}
|
||||
|
||||
if(!_tcschr(str, _T(' ')))
|
||||
if (!_tcschr(str, _T(' ')))
|
||||
{
|
||||
/* No spaces, everything goes to Suffix */
|
||||
_tcscpy(szSuffix,str);
|
||||
/* look for a slash just in case */
|
||||
szSearch = _tcsrchr(str, _T('\\'));
|
||||
if(szSearch)
|
||||
if (szSearch)
|
||||
{
|
||||
szSearch++;
|
||||
szSearch[0] = _T('\0');
|
||||
|
@ -431,7 +431,7 @@ VOID FindPrefixAndSuffix(LPTSTR strIN, LPTSTR szPrefix, LPTSTR szSuffix)
|
|||
return;
|
||||
}
|
||||
|
||||
if(!nQuotes)
|
||||
if (!nQuotes)
|
||||
{
|
||||
/* No quotes, and there is a space*/
|
||||
/* Take it after the last space */
|
||||
|
@ -443,9 +443,9 @@ VOID FindPrefixAndSuffix(LPTSTR strIN, LPTSTR szPrefix, LPTSTR szSuffix)
|
|||
szSearch1 = _tcsrchr(str, _T(' '));
|
||||
szSearch2 = _tcsrchr(str, _T('\\'));
|
||||
szSearch3 = _tcsrchr(str, _T('/'));
|
||||
if(szSearch2 != NULL && _tcslen(szSearch1) > _tcslen(szSearch2))
|
||||
if (szSearch2 != NULL && _tcslen(szSearch1) > _tcslen(szSearch2))
|
||||
szSearch = szSearch2;
|
||||
else if(szSearch3 != NULL && _tcslen(szSearch1) > _tcslen(szSearch3))
|
||||
else if (szSearch3 != NULL && _tcslen(szSearch1) > _tcslen(szSearch3))
|
||||
szSearch = szSearch3;
|
||||
else
|
||||
szSearch = szSearch1;
|
||||
|
@ -460,11 +460,11 @@ VOID FindPrefixAndSuffix(LPTSTR strIN, LPTSTR szPrefix, LPTSTR szSuffix)
|
|||
not inside a quotes */
|
||||
for(i = 0; i < _tcslen(str); i++)
|
||||
{
|
||||
if(str[i] == _T('\"'))
|
||||
if (str[i] == _T('\"'))
|
||||
bInside = !bInside;
|
||||
if(str[i] == _T(' ') && !bInside)
|
||||
if (str[i] == _T(' ') && !bInside)
|
||||
SBreak = i;
|
||||
if((str[i] == _T(' ') || str[i] == _T('\\')) && !bInside)
|
||||
if ((str[i] == _T(' ') || str[i] == _T('\\')) && !bInside)
|
||||
PBreak = i;
|
||||
}
|
||||
SBreak++;
|
||||
|
@ -493,7 +493,7 @@ int __cdecl compare(const void *arg1,const void *arg2)
|
|||
return 0;
|
||||
|
||||
File2 = cmd_alloc(sizeof(FileName));
|
||||
if(!File2)
|
||||
if (!File2)
|
||||
{
|
||||
cmd_free(File1);
|
||||
return 0;
|
||||
|
@ -583,7 +583,7 @@ VOID CompleteFilename (LPTSTR strIN, BOOL bNext, LPTSTR strOut, UINT cusor)
|
|||
|
||||
while (_istspace (*line))
|
||||
line++;
|
||||
if(!_tcsnicmp (line, _T("rd "), 3) || !_tcsnicmp (line, _T("cd "), 3))
|
||||
if (!_tcsnicmp (line, _T("rd "), 3) || !_tcsnicmp (line, _T("cd "), 3))
|
||||
ShowAll = FALSE;
|
||||
|
||||
/* Copy the string, str can be edited and orginal should not be */
|
||||
|
@ -591,17 +591,17 @@ VOID CompleteFilename (LPTSTR strIN, BOOL bNext, LPTSTR strOut, UINT cusor)
|
|||
_tcscpy(szOrginal,strIN);
|
||||
|
||||
/* Look to see if the cusor is not at the end of the string */
|
||||
if((cusor + 1) < _tcslen(str))
|
||||
if ((cusor + 1) < _tcslen(str))
|
||||
str[cusor] = _T('\0');
|
||||
|
||||
/* 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 */
|
||||
StartLength = _tcslen(str);
|
||||
|
||||
/* no string, we need all files in that directory */
|
||||
if(!StartLength)
|
||||
if (!StartLength)
|
||||
{
|
||||
_tcscat(str,_T("*"));
|
||||
}
|
||||
|
@ -618,7 +618,7 @@ VOID CompleteFilename (LPTSTR strIN, BOOL bNext, LPTSTR strOut, UINT cusor)
|
|||
/* Strip quotes */
|
||||
for(i = 0; i < _tcslen(szBaseWord); )
|
||||
{
|
||||
if(szBaseWord[i] == _T('\"'))
|
||||
if (szBaseWord[i] == _T('\"'))
|
||||
memmove(&szBaseWord[i],&szBaseWord[i + 1], _tcslen(&szBaseWord[i]) * sizeof(TCHAR));
|
||||
else
|
||||
i++;
|
||||
|
@ -639,7 +639,7 @@ VOID CompleteFilename (LPTSTR strIN, BOOL bNext, LPTSTR strOut, UINT cusor)
|
|||
_tcscat(szSearchPath, szBaseWord);
|
||||
}
|
||||
|
||||
if(StartLength > 0)
|
||||
if (StartLength > 0)
|
||||
{
|
||||
_tcscat(szSearchPath,_T("*"));
|
||||
}
|
||||
|
@ -654,7 +654,7 @@ VOID CompleteFilename (LPTSTR strIN, BOOL bNext, LPTSTR strOut, UINT cusor)
|
|||
}
|
||||
/* search for the files it might be */
|
||||
hFile = FindFirstFile (szSearchPath, &file);
|
||||
if(hFile == INVALID_HANDLE_VALUE)
|
||||
if (hFile == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
/* Assemble the orginal string and return */
|
||||
_tcscpy(strOut,szOrginal);
|
||||
|
@ -666,12 +666,12 @@ VOID CompleteFilename (LPTSTR strIN, BOOL bNext, LPTSTR strOut, UINT cusor)
|
|||
{
|
||||
FileName * oldFileList = FileList;
|
||||
|
||||
if(!_tcscmp (file.cFileName, _T(".")) ||
|
||||
if (!_tcscmp (file.cFileName, _T(".")) ||
|
||||
!_tcscmp (file.cFileName, _T("..")))
|
||||
continue;
|
||||
|
||||
/* Don't show files when they are doing 'cd' or 'rd' */
|
||||
if(!ShowAll &&
|
||||
if (!ShowAll &&
|
||||
file.dwFileAttributes != 0xFFFFFFFF &&
|
||||
!(file.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY))
|
||||
{
|
||||
|
@ -681,7 +681,7 @@ VOID CompleteFilename (LPTSTR strIN, BOOL bNext, LPTSTR strOut, UINT cusor)
|
|||
/* Add the file to the list of files */
|
||||
FileList = cmd_realloc(FileList, ++FileListSize * sizeof(FileName));
|
||||
|
||||
if(FileList == NULL)
|
||||
if (FileList == NULL)
|
||||
{
|
||||
/* Don't leak old buffer */
|
||||
cmd_free(oldFileList);
|
||||
|
@ -700,10 +700,10 @@ VOID CompleteFilename (LPTSTR strIN, BOOL bNext, LPTSTR strOut, UINT cusor)
|
|||
|
||||
/* Check the size of the list to see if we
|
||||
found any matches */
|
||||
if(FileListSize == 0)
|
||||
if (FileListSize == 0)
|
||||
{
|
||||
_tcscpy(strOut,szOrginal);
|
||||
if(FileList != NULL)
|
||||
if (FileList != NULL)
|
||||
cmd_free(FileList);
|
||||
return;
|
||||
|
||||
|
@ -712,18 +712,18 @@ VOID CompleteFilename (LPTSTR strIN, BOOL bNext, LPTSTR strOut, UINT cusor)
|
|||
qsort(FileList,FileListSize,sizeof(FileName), compare);
|
||||
|
||||
/* Find the next/previous */
|
||||
if(!_tcscmp(szOrginal,LastReturned))
|
||||
if (!_tcscmp(szOrginal,LastReturned))
|
||||
{
|
||||
if(bNext)
|
||||
if (bNext)
|
||||
{
|
||||
if(FileListSize - 1 == Sel)
|
||||
if (FileListSize - 1 == Sel)
|
||||
Sel = 0;
|
||||
else
|
||||
Sel++;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!Sel)
|
||||
if (!Sel)
|
||||
Sel = FileListSize - 1;
|
||||
else
|
||||
Sel--;
|
||||
|
@ -750,24 +750,24 @@ VOID CompleteFilename (LPTSTR strIN, BOOL bNext, LPTSTR strOut, UINT cusor)
|
|||
/* Find the place to put the " at the start */
|
||||
for(i = 0; i < _tcslen(szPrefix); i++)
|
||||
{
|
||||
if(szPrefix[i] == _T('\"'))
|
||||
if (szPrefix[i] == _T('\"'))
|
||||
bInside = !bInside;
|
||||
if(szPrefix[i] == _T(' ') && !bInside)
|
||||
if (szPrefix[i] == _T(' ') && !bInside)
|
||||
LastSpace = i;
|
||||
}
|
||||
|
||||
/* insert the quotation and move things around */
|
||||
if(szPrefix[LastSpace + 1] != _T('\"') && LastSpace != -1)
|
||||
if (szPrefix[LastSpace + 1] != _T('\"') && LastSpace != -1)
|
||||
{
|
||||
memmove ( &szPrefix[LastSpace+1], &szPrefix[LastSpace], (_tcslen(szPrefix)-LastSpace+1) * sizeof(TCHAR) );
|
||||
|
||||
if((UINT)(LastSpace + 1) == _tcslen(szPrefix))
|
||||
if ((UINT)(LastSpace + 1) == _tcslen(szPrefix))
|
||||
{
|
||||
_tcscat(szPrefix,_T("\""));
|
||||
}
|
||||
szPrefix[LastSpace + 1] = _T('\"');
|
||||
}
|
||||
else if(LastSpace == -1)
|
||||
else if (LastSpace == -1)
|
||||
{
|
||||
/* Add quotation only if none exists already */
|
||||
if (szPrefix[0] != _T('\"'))
|
||||
|
@ -783,22 +783,22 @@ VOID CompleteFilename (LPTSTR strIN, BOOL bNext, LPTSTR strOut, UINT cusor)
|
|||
_tcscat(strOut,FileList[Sel].Name);
|
||||
|
||||
/* check for odd number of quotes means we need to close them */
|
||||
if(!NeededQuote)
|
||||
if (!NeededQuote)
|
||||
{
|
||||
for(i = 0; i < _tcslen(strOut); i++)
|
||||
{
|
||||
if(strOut[i] == _T('\"'))
|
||||
if (strOut[i] == _T('\"'))
|
||||
NeededQuote = !NeededQuote;
|
||||
}
|
||||
}
|
||||
|
||||
if(szPrefix[_tcslen(szPrefix) - 1] == _T('\"') || NeededQuote)
|
||||
if (szPrefix[_tcslen(szPrefix) - 1] == _T('\"') || NeededQuote)
|
||||
_tcscat(strOut,_T("\""));
|
||||
|
||||
_tcscpy(LastReturned,strOut);
|
||||
//EndLength = _tcslen(strOut);
|
||||
//DiffLength = EndLength - StartLength;
|
||||
if(FileList != NULL)
|
||||
if (FileList != NULL)
|
||||
cmd_free(FileList);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -219,8 +219,8 @@ VOID add_at_bottom(LPTSTR string)
|
|||
return;
|
||||
|
||||
/*if new entry is the same than the last do not add it*/
|
||||
if(size)
|
||||
if(_tcscmp(string,Bottom->next->string)==0)
|
||||
if (size)
|
||||
if (_tcscmp(string,Bottom->next->string)==0)
|
||||
return;
|
||||
|
||||
/*fill bottom with string, it will become Bottom->next*/
|
||||
|
@ -287,7 +287,7 @@ LPCTSTR PeekHistory(INT dir)
|
|||
|
||||
VOID History (INT dir, LPTSTR commandline)
|
||||
{
|
||||
if(dir==0)
|
||||
if (dir==0)
|
||||
{
|
||||
add_at_bottom(commandline);
|
||||
curr_ptr=Bottom;
|
||||
|
@ -300,7 +300,7 @@ VOID History (INT dir, LPTSTR commandline)
|
|||
return;
|
||||
}
|
||||
|
||||
if(dir<0)/*key up*/
|
||||
if (dir<0)/*key up*/
|
||||
{
|
||||
if (curr_ptr->next==Top || curr_ptr==Top)
|
||||
{
|
||||
|
@ -314,11 +314,11 @@ VOID History (INT dir, LPTSTR commandline)
|
|||
}
|
||||
|
||||
curr_ptr = curr_ptr->next;
|
||||
if(curr_ptr->string)
|
||||
if (curr_ptr->string)
|
||||
_tcscpy(commandline,curr_ptr->string);
|
||||
}
|
||||
|
||||
if(dir>0)
|
||||
if (dir>0)
|
||||
{
|
||||
if (curr_ptr->prev==Bottom || curr_ptr==Bottom)
|
||||
{
|
||||
|
@ -332,7 +332,7 @@ VOID History (INT dir, LPTSTR commandline)
|
|||
}
|
||||
|
||||
curr_ptr=curr_ptr->prev;
|
||||
if(curr_ptr->string)
|
||||
if (curr_ptr->string)
|
||||
_tcscpy(commandline,curr_ptr->string);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -297,7 +297,7 @@ MakeFullPath(TCHAR * DirPath)
|
|||
n = p ? p++ - DirPath : _tcslen(DirPath);
|
||||
_tcsncpy(path, DirPath, n);
|
||||
path[n] = _T('\0');
|
||||
if( !CreateDirectory(path, NULL) &&
|
||||
if ( !CreateDirectory(path, NULL) &&
|
||||
(GetLastError() != ERROR_ALREADY_EXISTS))
|
||||
{
|
||||
return FALSE;
|
||||
|
@ -334,7 +334,7 @@ INT cmd_mkdir (LPTSTR param)
|
|||
{
|
||||
if (!MakeFullPath(p[i]))
|
||||
{
|
||||
if(GetLastError() == ERROR_PATH_NOT_FOUND)
|
||||
if (GetLastError() == ERROR_PATH_NOT_FOUND)
|
||||
{
|
||||
ConErrResPuts(STRING_MD_ERROR2);
|
||||
}
|
||||
|
@ -376,12 +376,12 @@ BOOL DeleteFolder(LPTSTR FileName)
|
|||
_tcscpy(TempFileName,Base);
|
||||
_tcscat(TempFileName,f.cFileName);
|
||||
|
||||
if(f.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
|
||||
if (f.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
|
||||
DeleteFolder(TempFileName);
|
||||
else
|
||||
{
|
||||
SetFileAttributes(TempFileName,FILE_ATTRIBUTE_NORMAL);
|
||||
if(!DeleteFile(TempFileName))
|
||||
if (!DeleteFile(TempFileName))
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -94,16 +94,16 @@ VOID GetPathCase( TCHAR * Path, TCHAR * OutPath)
|
|||
|
||||
for(i = 0; i < _tcslen(Path); i++)
|
||||
{
|
||||
if(Path[i] != _T('\\'))
|
||||
if (Path[i] != _T('\\'))
|
||||
{
|
||||
_tcsncat(TempPath, &Path[i], 1);
|
||||
if(i != _tcslen(Path) - 1)
|
||||
if (i != _tcslen(Path) - 1)
|
||||
continue;
|
||||
}
|
||||
/* Handle the base part of the path different.
|
||||
Because if you put it into findfirstfile, it will
|
||||
return your current folder */
|
||||
if(_tcslen(TempPath) == 2 && TempPath[1] == _T(':'))
|
||||
if (_tcslen(TempPath) == 2 && TempPath[1] == _T(':'))
|
||||
{
|
||||
_tcscat(OutPath, TempPath);
|
||||
_tcscat(OutPath, _T("\\"));
|
||||
|
@ -112,7 +112,7 @@ VOID GetPathCase( TCHAR * Path, TCHAR * OutPath)
|
|||
else
|
||||
{
|
||||
hFind = FindFirstFile(TempPath,&FindFileData);
|
||||
if(hFind == INVALID_HANDLE_VALUE)
|
||||
if (hFind == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
_tcscpy(OutPath, Path);
|
||||
return;
|
||||
|
@ -533,25 +533,25 @@ BOOL FileGetString (HANDLE hFile, LPTSTR lpBuffer, INT nBufferLength)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
INT PagePrompt (VOID)
|
||||
INT PagePrompt(VOID)
|
||||
{
|
||||
INPUT_RECORD ir;
|
||||
|
||||
ConOutResPuts(STRING_MISC_HELP1);
|
||||
|
||||
RemoveBreakHandler ();
|
||||
ConInDisable ();
|
||||
RemoveBreakHandler();
|
||||
ConInDisable();
|
||||
|
||||
do
|
||||
{
|
||||
ConInKey (&ir);
|
||||
ConInKey(&ir);
|
||||
}
|
||||
while ((ir.Event.KeyEvent.wVirtualKeyCode == VK_SHIFT) ||
|
||||
(ir.Event.KeyEvent.wVirtualKeyCode == VK_MENU) ||
|
||||
(ir.Event.KeyEvent.wVirtualKeyCode == VK_CONTROL));
|
||||
|
||||
AddBreakHandler ();
|
||||
ConInEnable ();
|
||||
AddBreakHandler();
|
||||
ConInEnable();
|
||||
|
||||
if ((ir.Event.KeyEvent.wVirtualKeyCode == VK_ESCAPE) ||
|
||||
((ir.Event.KeyEvent.wVirtualKeyCode == _T('C')) &&
|
||||
|
@ -600,8 +600,8 @@ INT FilePromptYN (UINT resID)
|
|||
|
||||
/* unfinished solution */
|
||||
#if 0
|
||||
RemoveBreakHandler ();
|
||||
ConInDisable ();
|
||||
RemoveBreakHandler();
|
||||
ConInDisable();
|
||||
|
||||
do
|
||||
{
|
||||
|
@ -616,8 +616,8 @@ INT FilePromptYN (UINT resID)
|
|||
(ir.Event.KeyEvent.wVirtualKeyCode == VK_MENU) ||
|
||||
(ir.Event.KeyEvent.wVirtualKeyCode == VK_CONTROL));
|
||||
|
||||
AddBreakHandler ();
|
||||
ConInEnable ();
|
||||
AddBreakHandler();
|
||||
ConInEnable();
|
||||
|
||||
if ((ir.Event.KeyEvent.wVirtualKeyCode == VK_ESCAPE) ||
|
||||
((ir.Event.KeyEvent.wVirtualKeyCode == 'C') &&
|
||||
|
@ -666,8 +666,8 @@ INT FilePromptYNA (UINT resID)
|
|||
|
||||
/* unfinished solution */
|
||||
#if 0
|
||||
RemoveBreakHandler ();
|
||||
ConInDisable ();
|
||||
RemoveBreakHandler();
|
||||
ConInDisable();
|
||||
|
||||
do
|
||||
{
|
||||
|
@ -680,8 +680,8 @@ INT FilePromptYNA (UINT resID)
|
|||
(ir.Event.KeyEvent.wVirtualKeyCode == VK_MENU) ||
|
||||
(ir.Event.KeyEvent.wVirtualKeyCode == VK_CONTROL));
|
||||
|
||||
AddBreakHandler ();
|
||||
ConInEnable ();
|
||||
AddBreakHandler();
|
||||
ConInEnable();
|
||||
|
||||
if ((ir.Event.KeyEvent.wVirtualKeyCode == VK_ESCAPE) ||
|
||||
((ir.Event.KeyEvent.wVirtualKeyCode == _T('C')) &&
|
||||
|
|
|
@ -283,7 +283,7 @@ INT cmd_move (LPTSTR param)
|
|||
~MOVE_SRC_CURRENT_IS_DIR &
|
||||
~MOVE_DEST_EXISTS;
|
||||
_tcscpy(szFullSrcPath,szSrcDirPath);
|
||||
if(szFullSrcPath[_tcslen(szFullSrcPath) - 1] != _T('\\'))
|
||||
if (szFullSrcPath[_tcslen(szFullSrcPath) - 1] != _T('\\'))
|
||||
_tcscat (szFullSrcPath, _T("\\"));
|
||||
_tcscat(szFullSrcPath,findBuffer.cFileName);
|
||||
_tcscpy(szSrcPath, szFullSrcPath);
|
||||
|
@ -311,7 +311,7 @@ INT cmd_move (LPTSTR param)
|
|||
/*build the dest string(accounts for *)*/
|
||||
_tcscpy (szFullDestPath, szDestPath);
|
||||
/*check to see if there is an ending slash, if not add one*/
|
||||
if(szFullDestPath[_tcslen(szFullDestPath) - 1] != _T('\\'))
|
||||
if (szFullDestPath[_tcslen(szFullDestPath) - 1] != _T('\\'))
|
||||
_tcscat (szFullDestPath, _T("\\"));
|
||||
_tcscat (szFullDestPath, findBuffer.cFileName);
|
||||
|
||||
|
@ -365,10 +365,10 @@ INT cmd_move (LPTSTR param)
|
|||
}
|
||||
|
||||
/*checks to make sure user wanted/wants the override*/
|
||||
if((dwFlags & MOVE_OVER_NO) &&
|
||||
if ((dwFlags & MOVE_OVER_NO) &&
|
||||
(dwMoveStatusFlags & MOVE_DEST_EXISTS))
|
||||
continue;
|
||||
if(!(dwFlags & MOVE_OVER_YES) &&
|
||||
if (!(dwFlags & MOVE_OVER_YES) &&
|
||||
(dwMoveStatusFlags & MOVE_DEST_EXISTS))
|
||||
nOverwrite = MoveOverwrite (szFullDestPath);
|
||||
if (nOverwrite == PROMPT_NO || nOverwrite == PROMPT_BREAK)
|
||||
|
@ -440,9 +440,9 @@ INT cmd_move (LPTSTR param)
|
|||
nDiff = _tcslen(szMoveDest) - _tcslen(szTempPath);
|
||||
pszDestDirPointer = pszDestDirPointer - nDiff;
|
||||
_tcscpy(pszDestDirPointer,_T(""));
|
||||
if(szMoveSrc[_tcslen(szMoveSrc) - 1] != _T('\\'))
|
||||
if (szMoveSrc[_tcslen(szMoveSrc) - 1] != _T('\\'))
|
||||
_tcscat (szMoveSrc, _T("\\"));
|
||||
if(szMoveDest[_tcslen(szMoveDest) - 1] != _T('\\'))
|
||||
if (szMoveDest[_tcslen(szMoveDest) - 1] != _T('\\'))
|
||||
_tcscat (szMoveDest, _T("\\"));
|
||||
pszDestDirPointer = szMoveDest + _tcslen(szMoveDest);
|
||||
pszSrcDirPointer = szMoveSrc + _tcslen(szMoveSrc);
|
||||
|
|
|
@ -57,7 +57,7 @@ VOID PrintPrompt(VOID)
|
|||
TCHAR szPrompt[256];
|
||||
LPTSTR pr;
|
||||
|
||||
if (GetEnvironmentVariable (_T("PROMPT"), szPrompt, 256))
|
||||
if (GetEnvironmentVariable(_T("PROMPT"), szPrompt, 256))
|
||||
pr = szPrompt;
|
||||
else
|
||||
pr = default_pr;
|
||||
|
@ -66,24 +66,24 @@ VOID PrintPrompt(VOID)
|
|||
{
|
||||
if (*pr != _T('$'))
|
||||
{
|
||||
ConOutChar (*pr);
|
||||
ConOutChar(*pr);
|
||||
}
|
||||
else
|
||||
{
|
||||
pr++;
|
||||
|
||||
switch (_totupper (*pr))
|
||||
switch (_totupper(*pr))
|
||||
{
|
||||
case _T('A'):
|
||||
ConOutChar (_T('&'));
|
||||
ConOutChar(_T('&'));
|
||||
break;
|
||||
|
||||
case _T('B'):
|
||||
ConOutChar (_T('|'));
|
||||
ConOutChar(_T('|'));
|
||||
break;
|
||||
|
||||
case _T('C'):
|
||||
ConOutChar (_T('('));
|
||||
ConOutChar(_T('('));
|
||||
break;
|
||||
|
||||
case _T('D'):
|
||||
|
@ -91,49 +91,49 @@ VOID PrintPrompt(VOID)
|
|||
break;
|
||||
|
||||
case _T('E'):
|
||||
ConOutChar (_T('\x1B'));
|
||||
ConOutChar(_T('\x1B'));
|
||||
break;
|
||||
|
||||
case _T('F'):
|
||||
ConOutChar (_T(')'));
|
||||
ConOutChar(_T(')'));
|
||||
break;
|
||||
|
||||
case _T('G'):
|
||||
ConOutChar (_T('>'));
|
||||
ConOutChar(_T('>'));
|
||||
break;
|
||||
|
||||
case _T('H'):
|
||||
ConOutChar (_T('\x08'));
|
||||
ConOutChar (_T(' '));
|
||||
ConOutChar (_T('\x08'));
|
||||
ConOutChar(_T('\x08'));
|
||||
ConOutChar(_T(' '));
|
||||
ConOutChar(_T('\x08'));
|
||||
break;
|
||||
|
||||
case _T('L'):
|
||||
ConOutChar (_T('<'));
|
||||
ConOutChar(_T('<'));
|
||||
break;
|
||||
|
||||
case _T('N'):
|
||||
{
|
||||
TCHAR szPath[MAX_PATH];
|
||||
GetCurrentDirectory (MAX_PATH, szPath);
|
||||
ConOutChar (szPath[0]);
|
||||
GetCurrentDirectory(MAX_PATH, szPath);
|
||||
ConOutChar(szPath[0]);
|
||||
}
|
||||
break;
|
||||
|
||||
case _T('P'):
|
||||
{
|
||||
TCHAR szPath[MAX_PATH];
|
||||
GetCurrentDirectory (MAX_PATH, szPath);
|
||||
ConOutPrintf (_T("%s"), szPath);
|
||||
GetCurrentDirectory(MAX_PATH, szPath);
|
||||
ConOutPrintf(_T("%s"), szPath);
|
||||
}
|
||||
break;
|
||||
|
||||
case _T('Q'):
|
||||
ConOutChar (_T('='));
|
||||
ConOutChar(_T('='));
|
||||
break;
|
||||
|
||||
case _T('S'):
|
||||
ConOutChar (_T(' '));
|
||||
case _T('S'):
|
||||
ConOutChar(_T(' '));
|
||||
break;
|
||||
|
||||
case _T('T'):
|
||||
|
@ -146,25 +146,25 @@ VOID PrintPrompt(VOID)
|
|||
case VER_PLATFORM_WIN32_WINDOWS:
|
||||
if (osvi.dwMajorVersion == 4 &&
|
||||
osvi.dwMinorVersion == 1)
|
||||
ConOutPrintf (_T("Windows 98"));
|
||||
ConOutPrintf(_T("Windows 98"));
|
||||
else
|
||||
ConOutPrintf (_T("Windows 95"));
|
||||
ConOutPrintf(_T("Windows 95"));
|
||||
break;
|
||||
|
||||
|
||||
case VER_PLATFORM_WIN32_NT:
|
||||
ConOutPrintf (_T("Windows NT Version %lu.%lu"),
|
||||
osvi.dwMajorVersion, osvi.dwMinorVersion);
|
||||
ConOutPrintf(_T("Windows NT Version %lu.%lu"),
|
||||
osvi.dwMajorVersion, osvi.dwMinorVersion);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case _T('_'):
|
||||
ConOutChar (_T('\n'));
|
||||
ConOutChar(_T('\n'));
|
||||
break;
|
||||
|
||||
case '$':
|
||||
ConOutChar (_T('$'));
|
||||
ConOutChar(_T('$'));
|
||||
break;
|
||||
|
||||
#ifdef FEATURE_DIRECTORY_STACK
|
||||
|
@ -172,7 +172,7 @@ VOID PrintPrompt(VOID)
|
|||
{
|
||||
INT i;
|
||||
for (i = 0; i < GetDirectoryStackDepth (); i++)
|
||||
ConOutChar (_T('+'));
|
||||
ConOutChar(_T('+'));
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
|
|
@ -171,24 +171,24 @@ INT cmd_rename (LPTSTR param)
|
|||
while(_tcschr(srcFILE, _T('\\')))
|
||||
{
|
||||
srcFILE++;
|
||||
if(*srcFILE==_T('\\')) nSlash++ ;
|
||||
if(!_tcschr(srcFILE, _T('\\'))) break;
|
||||
if (*srcFILE==_T('\\')) nSlash++ ;
|
||||
if (!_tcschr(srcFILE, _T('\\'))) break;
|
||||
}
|
||||
_tcsncpy(srcPath,srcPattern,_tcslen(srcPattern)-_tcslen(srcFILE));
|
||||
|
||||
if(_tcschr(dstPattern, _T('\\'))) //Checking if the Destiny (dstPattern)is also a Path.And splitting dstPattern in dstPath and srcPath.
|
||||
if (_tcschr(dstPattern, _T('\\'))) //Checking if the Destiny (dstPattern)is also a Path.And splitting dstPattern in dstPath and srcPath.
|
||||
{
|
||||
dstFILE = _tcschr(dstPattern, _T('\\'));
|
||||
nSlash=0;
|
||||
while(_tcschr(dstFILE, _T('\\')))
|
||||
{
|
||||
dstFILE++;
|
||||
if(*dstFILE==_T('\\')) nSlash++ ;
|
||||
if(!_tcschr(dstFILE, _T('\\'))) break;
|
||||
if (*dstFILE==_T('\\')) nSlash++ ;
|
||||
if (!_tcschr(dstFILE, _T('\\'))) break;
|
||||
}
|
||||
_tcsncpy(dstPath,dstPattern,_tcslen(dstPattern)-_tcslen(dstFILE));
|
||||
|
||||
if((_tcslen(dstPath)!=_tcslen(srcPath))||(_tcsncmp(srcPath,dstPath,_tcslen(srcPath))!=0)) //If it has a Path,then MUST be equal than srcPath
|
||||
if ((_tcslen(dstPath)!=_tcslen(srcPath))||(_tcsncmp(srcPath,dstPath,_tcslen(srcPath))!=0)) //If it has a Path,then MUST be equal than srcPath
|
||||
{
|
||||
error_syntax(dstPath);
|
||||
freep(arg);
|
||||
|
@ -205,7 +205,7 @@ INT cmd_rename (LPTSTR param)
|
|||
if (!_tcschr(srcPattern, _T('\\'))) //If srcPattern isn't a Path but a name:
|
||||
{
|
||||
srcFILE=srcPattern;
|
||||
if(_tcschr(dstPattern, _T('\\')))
|
||||
if (_tcschr(dstPattern, _T('\\')))
|
||||
{
|
||||
error_syntax(dstPattern);
|
||||
freep(arg);
|
||||
|
@ -286,7 +286,7 @@ INT cmd_rename (LPTSTR param)
|
|||
}
|
||||
*r = 0;
|
||||
//Well we have splitted the Paths,so now we have to paste them again(if needed),thanks bPath.
|
||||
if(bPath == TRUE)
|
||||
if (bPath == TRUE)
|
||||
{
|
||||
_tcscpy(srcFinal,srcPath);
|
||||
_tcscat(srcFinal,f.cFileName);
|
||||
|
|
|
@ -36,7 +36,7 @@ void invalid_switch(LPTSTR is)
|
|||
/* retrives the pathe dependen om the input file name */
|
||||
void getPath(TCHAR* out, LPTSTR in)
|
||||
{
|
||||
if(_tcslen(in) == 2 && in[1] == _T(':'))
|
||||
if (_tcslen(in) == 2 && in[1] == _T(':'))
|
||||
GetRootPath(in,out,MAX_PATH);
|
||||
else
|
||||
GetFullPathName (in, MAX_PATH, out, NULL);
|
||||
|
@ -83,7 +83,7 @@ INT replace(TCHAR source[MAX_PATH], TCHAR dest[MAX_PATH], DWORD dwFlags, BOOL *d
|
|||
*/
|
||||
dwAttrib = GetFileAttributes (source);
|
||||
|
||||
if(IsExistingFile (dest))
|
||||
if (IsExistingFile (dest))
|
||||
{
|
||||
/*
|
||||
* Resets the attributes to avoid probles with read only files,
|
||||
|
@ -94,7 +94,7 @@ INT replace(TCHAR source[MAX_PATH], TCHAR dest[MAX_PATH], DWORD dwFlags, BOOL *d
|
|||
* Is the update flas set? The time has to be controled so that
|
||||
* only older files are replaced.
|
||||
*/
|
||||
if(dwFlags & REPLACE_UPDATE)
|
||||
if (dwFlags & REPLACE_UPDATE)
|
||||
{
|
||||
/* Read destination time */
|
||||
hFileDest = CreateFile(dest, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING,
|
||||
|
@ -108,7 +108,7 @@ INT replace(TCHAR source[MAX_PATH], TCHAR dest[MAX_PATH], DWORD dwFlags, BOOL *d
|
|||
|
||||
/* Compare time */
|
||||
GetFileTime (hFileDest, &destCreationTime, &destLastAccessTime, &destLastWriteTime);
|
||||
if(!((srcLastWriteTime.dwHighDateTime > destLastWriteTime.dwHighDateTime) ||
|
||||
if (!((srcLastWriteTime.dwHighDateTime > destLastWriteTime.dwHighDateTime) ||
|
||||
(srcLastWriteTime.dwHighDateTime == destLastWriteTime.dwHighDateTime &&
|
||||
srcLastWriteTime.dwLowDateTime > destLastWriteTime.dwLowDateTime)))
|
||||
{
|
||||
|
@ -123,25 +123,25 @@ INT replace(TCHAR source[MAX_PATH], TCHAR dest[MAX_PATH], DWORD dwFlags, BOOL *d
|
|||
}
|
||||
|
||||
/* Check confirm flag, and take appropriate action */
|
||||
if(dwFlags & REPLACE_CONFIRM)
|
||||
if (dwFlags & REPLACE_CONFIRM)
|
||||
{
|
||||
/* Output depending on add flag */
|
||||
if(dwFlags & REPLACE_ADD)
|
||||
if (dwFlags & REPLACE_ADD)
|
||||
ConOutResPrintf(STRING_REPLACE_HELP9, dest);
|
||||
else
|
||||
ConOutResPrintf(STRING_REPLACE_HELP10, dest);
|
||||
if( !FilePromptYNA (0))
|
||||
if ( !FilePromptYNA (0))
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Output depending on add flag */
|
||||
if(dwFlags & REPLACE_ADD)
|
||||
if (dwFlags & REPLACE_ADD)
|
||||
ConOutResPrintf(STRING_REPLACE_HELP11, dest);
|
||||
else
|
||||
ConOutResPrintf(STRING_REPLACE_HELP5, dest);
|
||||
|
||||
/* Make sure source and destination is not the same */
|
||||
if(!_tcscmp(s, d))
|
||||
if (!_tcscmp(s, d))
|
||||
{
|
||||
ConOutResPaging(TRUE, STRING_REPLACE_ERROR7);
|
||||
CloseHandle (hFileSrc);
|
||||
|
@ -229,7 +229,7 @@ INT recReplace(DWORD dwFlags,
|
|||
*/
|
||||
for(i = (_tcslen(szSrcPath) - 1); i > -1; i--)
|
||||
{
|
||||
if(szSrcPath[i] != _T('\\'))
|
||||
if (szSrcPath[i] != _T('\\'))
|
||||
szSrcPath[i] = _T('\0');
|
||||
else
|
||||
break;
|
||||
|
@ -238,17 +238,17 @@ INT recReplace(DWORD dwFlags,
|
|||
/* Go through all the soursfiles and copy/replace them */
|
||||
do
|
||||
{
|
||||
if(CheckCtrlBreak(BREAK_INPUT))
|
||||
if (CheckCtrlBreak(BREAK_INPUT))
|
||||
{
|
||||
return filesReplaced;
|
||||
}
|
||||
|
||||
/* Problem with file handler */
|
||||
if(hFile == INVALID_HANDLE_VALUE)
|
||||
if (hFile == INVALID_HANDLE_VALUE)
|
||||
return filesReplaced;
|
||||
|
||||
/* We do not want to replace any .. . ocr directory */
|
||||
if(!_tcscmp (findBuffer.cFileName, _T(".")) ||
|
||||
if (!_tcscmp (findBuffer.cFileName, _T(".")) ||
|
||||
!_tcscmp (findBuffer.cFileName, _T(".."))||
|
||||
findBuffer.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
|
||||
continue;
|
||||
|
@ -259,23 +259,23 @@ INT recReplace(DWORD dwFlags,
|
|||
|
||||
dwAttrib = GetFileAttributes(tmpDestPath);
|
||||
/* Check add flag */
|
||||
if(dwFlags & REPLACE_ADD)
|
||||
if (dwFlags & REPLACE_ADD)
|
||||
{
|
||||
if(IsExistingFile(tmpDestPath))
|
||||
if (IsExistingFile(tmpDestPath))
|
||||
continue;
|
||||
else
|
||||
dwAttrib = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!IsExistingFile(tmpDestPath))
|
||||
if (!IsExistingFile(tmpDestPath))
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Check if file is read only, if so check if that should be ignored */
|
||||
if(dwAttrib & FILE_ATTRIBUTE_READONLY)
|
||||
if (dwAttrib & FILE_ATTRIBUTE_READONLY)
|
||||
{
|
||||
if(!(dwFlags & REPLACE_READ_ONLY))
|
||||
if (!(dwFlags & REPLACE_READ_ONLY))
|
||||
{
|
||||
ConOutResPrintf(STRING_REPLACE_ERROR5, tmpDestPath);
|
||||
*doMore = FALSE;
|
||||
|
@ -288,7 +288,7 @@ INT recReplace(DWORD dwFlags,
|
|||
_tcscat (tmpSrcPath, findBuffer.cFileName);
|
||||
|
||||
/* Make the replace */
|
||||
if(replace(tmpSrcPath,tmpDestPath, dwFlags, doMore))
|
||||
if (replace(tmpSrcPath,tmpDestPath, dwFlags, doMore))
|
||||
{
|
||||
filesReplaced++;
|
||||
}
|
||||
|
@ -329,7 +329,7 @@ INT recFindSubDirs(DWORD dwFlags,
|
|||
/* Remove the star added earlyer to dest path */
|
||||
for(i = (_tcslen(szDestPath) - 1); i > -1; i--)
|
||||
{
|
||||
if(szDestPath[i] != _T('\\'))
|
||||
if (szDestPath[i] != _T('\\'))
|
||||
szDestPath[i] = _T('\0');
|
||||
else
|
||||
break;
|
||||
|
@ -341,7 +341,7 @@ INT recFindSubDirs(DWORD dwFlags,
|
|||
/* Save the source path so that it will not be wrecked */
|
||||
_tcscpy(tmpSrcPath,szSrcPath);
|
||||
/* Check for reading problems */
|
||||
if(hFile == INVALID_HANDLE_VALUE)
|
||||
if (hFile == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
ConOutFormatMessage (GetLastError(), tmpSrcPath);
|
||||
return filesReplaced;
|
||||
|
@ -351,7 +351,7 @@ INT recFindSubDirs(DWORD dwFlags,
|
|||
* Check if the we should enter the dir or if it is a file
|
||||
* or . or .. if so thake the next object to process.
|
||||
*/
|
||||
if(!_tcscmp (findBuffer.cFileName, _T(".")) ||
|
||||
if (!_tcscmp (findBuffer.cFileName, _T(".")) ||
|
||||
!_tcscmp (findBuffer.cFileName, _T(".."))||
|
||||
IsExistingFile(findBuffer.cFileName))
|
||||
continue;
|
||||
|
@ -359,20 +359,20 @@ INT recFindSubDirs(DWORD dwFlags,
|
|||
_tcscpy(tmpDestPath,szDestPath);
|
||||
_tcscat (tmpDestPath, findBuffer.cFileName);
|
||||
/* Make sure that we have a directory */
|
||||
if(IsExistingDirectory(tmpDestPath))
|
||||
if (IsExistingDirectory(tmpDestPath))
|
||||
{
|
||||
/* Add a \ to the end or the path */
|
||||
if(szDestPath[_tcslen(tmpDestPath) - 1] != _T('\\'))
|
||||
if (szDestPath[_tcslen(tmpDestPath) - 1] != _T('\\'))
|
||||
_tcscat(tmpDestPath, _T("\\"));
|
||||
/* Call the function to replace files in the new directory */
|
||||
filesReplaced += recReplace(dwFlags, tmpSrcPath, tmpDestPath, doMore);
|
||||
/* If there were problems break e.g. read-only file */
|
||||
if(!*doMore)
|
||||
if (!*doMore)
|
||||
break;
|
||||
_tcscpy(tmpSrcPath,szSrcPath);
|
||||
/* Controle the next level of subdirs */
|
||||
filesReplaced += recFindSubDirs(dwFlags,tmpSrcPath,tmpDestPath, doMore);
|
||||
if(!*doMore)
|
||||
if (!*doMore)
|
||||
break;
|
||||
}
|
||||
/* Get the next handle */
|
||||
|
@ -442,11 +442,11 @@ INT cmd_replace (LPTSTR param)
|
|||
}
|
||||
else
|
||||
{
|
||||
if(srcIndex == -1)
|
||||
if (srcIndex == -1)
|
||||
{
|
||||
srcIndex = i;
|
||||
}
|
||||
else if(destIndex == -1)
|
||||
else if (destIndex == -1)
|
||||
{
|
||||
destIndex = i;
|
||||
}
|
||||
|
@ -468,7 +468,7 @@ INT cmd_replace (LPTSTR param)
|
|||
return 1;
|
||||
}
|
||||
/* Check so that not both update and add switch is added and subdir */
|
||||
if((dwFlags & REPLACE_UPDATE || dwFlags & REPLACE_SUBDIR) && (dwFlags & REPLACE_ADD))
|
||||
if ((dwFlags & REPLACE_UPDATE || dwFlags & REPLACE_SUBDIR) && (dwFlags & REPLACE_ADD))
|
||||
{
|
||||
ConOutResPaging(TRUE,STRING_REPLACE_ERROR4);
|
||||
ConOutResPaging(TRUE,STRING_REPLACE_HELP7);
|
||||
|
@ -477,9 +477,9 @@ INT cmd_replace (LPTSTR param)
|
|||
}
|
||||
|
||||
/* If we have a destination get the full path */
|
||||
if(destIndex != -1)
|
||||
if (destIndex != -1)
|
||||
{
|
||||
if(_tcslen(arg[destIndex]) == 2 && arg[destIndex][1] == ':')
|
||||
if (_tcslen(arg[destIndex]) == 2 && arg[destIndex][1] == ':')
|
||||
GetRootPath(arg[destIndex],szDestPath,MAX_PATH);
|
||||
else
|
||||
{
|
||||
|
@ -494,7 +494,7 @@ INT cmd_replace (LPTSTR param)
|
|||
}
|
||||
getPath(szDestPath, arg[destIndex]);
|
||||
/* Make sure that destination exists */
|
||||
if(!IsExistingDirectory(szDestPath))
|
||||
if (!IsExistingDirectory(szDestPath))
|
||||
{
|
||||
ConOutResPrintf(STRING_REPLACE_ERROR2, szDestPath);
|
||||
ConOutResPaging(TRUE,STRING_REPLACE_HELP3);
|
||||
|
@ -510,7 +510,7 @@ INT cmd_replace (LPTSTR param)
|
|||
}
|
||||
|
||||
/* Get the full source path */
|
||||
if(!(_tcslen(arg[srcIndex]) == 2 && arg[srcIndex][1] == ':'))
|
||||
if (!(_tcslen(arg[srcIndex]) == 2 && arg[srcIndex][1] == ':'))
|
||||
getPath(szSrcPath, arg[srcIndex]);
|
||||
else
|
||||
_tcscpy(szSrcPath,arg[srcIndex]);
|
||||
|
@ -520,7 +520,7 @@ INT cmd_replace (LPTSTR param)
|
|||
_tcschr (arg[srcIndex], _T('?')) == NULL)
|
||||
{
|
||||
/* Check so that source is not a directory, because that is not allowed */
|
||||
if(IsExistingDirectory(szSrcPath))
|
||||
if (IsExistingDirectory(szSrcPath))
|
||||
{
|
||||
ConOutResPrintf(STRING_REPLACE_ERROR6, szSrcPath);
|
||||
ConOutResPaging(TRUE,STRING_REPLACE_HELP3);
|
||||
|
@ -528,7 +528,7 @@ INT cmd_replace (LPTSTR param)
|
|||
return 1;
|
||||
}
|
||||
/* Check if the file exists */
|
||||
if(!IsExistingFile(szSrcPath))
|
||||
if (!IsExistingFile(szSrcPath))
|
||||
{
|
||||
ConOutResPaging(TRUE,STRING_REPLACE_HELP3);
|
||||
freep(arg);
|
||||
|
@ -536,14 +536,14 @@ INT cmd_replace (LPTSTR param)
|
|||
}
|
||||
}
|
||||
/* /w switch is set so wait for any key to be pressed */
|
||||
if(dwFlags & REPLACE_DISK)
|
||||
if (dwFlags & REPLACE_DISK)
|
||||
{
|
||||
msg_pause();
|
||||
cgetchar();
|
||||
}
|
||||
|
||||
/* Add an extra \ to the destination path if needed */
|
||||
if(szDestPath[_tcslen(szDestPath) - 1] != _T('\\'))
|
||||
if (szDestPath[_tcslen(szDestPath) - 1] != _T('\\'))
|
||||
_tcscat(szDestPath, _T("\\"));
|
||||
|
||||
/* Save source path */
|
||||
|
@ -551,19 +551,19 @@ INT cmd_replace (LPTSTR param)
|
|||
/* Replace in dest dir */
|
||||
filesReplaced += recReplace(dwFlags, tmpSrcPath, szDestPath, &doMore);
|
||||
/* If subdir switch is set replace in the subdirs to */
|
||||
if(dwFlags & REPLACE_SUBDIR && doMore)
|
||||
if (dwFlags & REPLACE_SUBDIR && doMore)
|
||||
{
|
||||
filesReplaced += recFindSubDirs(dwFlags, szSrcPath, szDestPath, &doMore);
|
||||
}
|
||||
|
||||
/* If source == dest write no more */
|
||||
if(filesReplaced != -1)
|
||||
if (filesReplaced != -1)
|
||||
{
|
||||
/* No files replaced */
|
||||
if(filesReplaced==0)
|
||||
if (filesReplaced==0)
|
||||
{
|
||||
/* Add switch dependent output */
|
||||
if(dwFlags & REPLACE_ADD)
|
||||
if (dwFlags & REPLACE_ADD)
|
||||
ConOutResPaging(TRUE,STRING_REPLACE_HELP7);
|
||||
else
|
||||
ConOutResPaging(TRUE,STRING_REPLACE_HELP3);
|
||||
|
@ -572,7 +572,7 @@ INT cmd_replace (LPTSTR param)
|
|||
else
|
||||
{
|
||||
/* Add switch dependent output */
|
||||
if(dwFlags & REPLACE_ADD)
|
||||
if (dwFlags & REPLACE_ADD)
|
||||
ConOutResPrintf(STRING_REPLACE_HELP8, filesReplaced);
|
||||
else
|
||||
ConOutResPrintf(STRING_REPLACE_HELP4, filesReplaced);
|
||||
|
|
|
@ -33,7 +33,7 @@ INT CommandScreen (LPTSTR param)
|
|||
while(_istspace(*param))
|
||||
param++;
|
||||
|
||||
if(!(*param))
|
||||
if (!(*param))
|
||||
{
|
||||
error_req_param_missing ();
|
||||
return 1;
|
||||
|
@ -48,7 +48,7 @@ INT CommandScreen (LPTSTR param)
|
|||
}
|
||||
|
||||
//get col
|
||||
if(!(param = _tcschr(param,_T(' '))))
|
||||
if (!(param = _tcschr(param,_T(' '))))
|
||||
{
|
||||
error_req_param_missing ();
|
||||
return 1;
|
||||
|
@ -57,7 +57,7 @@ INT CommandScreen (LPTSTR param)
|
|||
while(_istspace(*param))
|
||||
param++;
|
||||
|
||||
if(!(*param))
|
||||
if (!(*param))
|
||||
{
|
||||
error_req_param_missing ();
|
||||
return 1;
|
||||
|
@ -71,7 +71,7 @@ INT CommandScreen (LPTSTR param)
|
|||
}
|
||||
|
||||
//get text
|
||||
if(!(param = _tcschr(param,_T(' '))))
|
||||
if (!(param = _tcschr(param,_T(' '))))
|
||||
{
|
||||
bSkipText = TRUE;
|
||||
}
|
||||
|
@ -80,7 +80,7 @@ INT CommandScreen (LPTSTR param)
|
|||
while(_istspace(*param))
|
||||
param++;
|
||||
|
||||
if(!(*param))
|
||||
if (!(*param))
|
||||
{
|
||||
bSkipText = TRUE;
|
||||
}
|
||||
|
@ -88,13 +88,13 @@ INT CommandScreen (LPTSTR param)
|
|||
|
||||
bIgnoreEcho = TRUE;
|
||||
|
||||
if(bSkipText)
|
||||
if (bSkipText)
|
||||
x=0;
|
||||
|
||||
|
||||
SetCursorXY(x,y);
|
||||
|
||||
if(!(bSkipText))
|
||||
if (!(bSkipText))
|
||||
ConOutPuts(param);
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -110,7 +110,7 @@ INT cmd_set (LPTSTR param)
|
|||
BOOL Success;
|
||||
StripQuotes(param);
|
||||
Success = seta_eval ( skip_ws(param+2) );
|
||||
if(!Success)
|
||||
if (!Success)
|
||||
{
|
||||
/* might seem random but this is what windows xp does */
|
||||
nErrorLevel = 9165;
|
||||
|
|
|
@ -185,7 +185,7 @@ INT cmd_start (LPTSTR Rest)
|
|||
}
|
||||
SetLastError(0);
|
||||
size = GetEnvironmentVariable (_T("COMSPEC"), comspec, MAX_PATH);
|
||||
if(GetLastError() == ERROR_ENVVAR_NOT_FOUND)
|
||||
if (GetLastError() == ERROR_ENVVAR_NOT_FOUND)
|
||||
{
|
||||
_tcscpy(comspec, _T("cmd"));
|
||||
}
|
||||
|
|
|
@ -94,10 +94,10 @@ INT chop_blank(LPTSTR *arg_str)
|
|||
{
|
||||
LPTSTR str;
|
||||
str = _tcschr(*arg_str,_T(' '));
|
||||
if(!str)
|
||||
if (!str)
|
||||
{
|
||||
str = _tcschr (*arg_str, _T('\0'));
|
||||
if(str != NULL)
|
||||
if (str != NULL)
|
||||
*arg_str=str;
|
||||
return CP_BLANK_NOT_FOUND;
|
||||
}
|
||||
|
@ -129,13 +129,13 @@ WORD hex_clr(LPTSTR str)
|
|||
|
||||
ch = str[1];
|
||||
|
||||
if(_istdigit(ch))
|
||||
if (_istdigit(ch))
|
||||
ret = ch-_T('0');
|
||||
else
|
||||
{
|
||||
ch=_totupper(ch);
|
||||
|
||||
if( ch >= _T('A') && ch <= _T('F') )
|
||||
if ( ch >= _T('A') && ch <= _T('F') )
|
||||
ret = ch-_T('A')+10;
|
||||
else
|
||||
return (WORD)-1;
|
||||
|
@ -143,13 +143,13 @@ WORD hex_clr(LPTSTR str)
|
|||
|
||||
ch = str[0];
|
||||
|
||||
if(_istdigit(ch))
|
||||
if (_istdigit(ch))
|
||||
ret |= (ch-_T('0')) << 4;
|
||||
else
|
||||
{
|
||||
ch=_totupper(ch);
|
||||
|
||||
if( ch >= _T('A') && ch <= _T('F') )
|
||||
if ( ch >= _T('A') && ch <= _T('F') )
|
||||
ret |= (ch-_T('A')+10) <<4;
|
||||
else
|
||||
return (WORD)-1;
|
||||
|
@ -215,15 +215,15 @@ WORD str_to_color(LPTSTR* arg_str)
|
|||
/* background */
|
||||
bBri = FALSE;
|
||||
|
||||
if(_tcsnicmp(str,_T("bri"),3) == 0 )
|
||||
if (_tcsnicmp(str,_T("bri"),3) == 0 )
|
||||
{
|
||||
bBri = TRUE;
|
||||
|
||||
if(chop_blank(&str))
|
||||
if (chop_blank(&str))
|
||||
return (WORD)-1;
|
||||
}
|
||||
|
||||
if( (tmp_clr = txt_clr(str)) == (WORD)-1 )
|
||||
if ( (tmp_clr = txt_clr(str)) == (WORD)-1 )
|
||||
return (WORD)-1;
|
||||
|
||||
chop_blank(&str);
|
||||
|
|
|
@ -143,7 +143,7 @@ INT CommandTimer (LPTSTR param)
|
|||
}
|
||||
|
||||
// do stuff (start/stop/read timer)
|
||||
if(NewClkStatus == NCS_ON)
|
||||
if (NewClkStatus == NCS_ON)
|
||||
{
|
||||
cT=GetTickCount();
|
||||
cS=TRUE;
|
||||
|
@ -154,9 +154,9 @@ INT CommandTimer (LPTSTR param)
|
|||
return 0;
|
||||
}
|
||||
|
||||
if(bS)
|
||||
if (bS)
|
||||
{
|
||||
if(cS)
|
||||
if (cS)
|
||||
{
|
||||
ConOutResPrintf (STRING_TIMER_TIME,clk_n,cS?_T("ON"):_T("OFF"));
|
||||
ConOutPrintf(_T("%s\n"), GetTimeString());
|
||||
|
|
|
@ -32,7 +32,7 @@ PrintVolumeHeader (LPTSTR pszRootPath)
|
|||
DWORD dwSerialNr;
|
||||
|
||||
/* get the volume information of the drive */
|
||||
if(!GetVolumeInformation(pszRootPath,
|
||||
if (!GetVolumeInformation(pszRootPath,
|
||||
szVolName,
|
||||
80,
|
||||
&dwSerialNr,
|
||||
|
|
|
@ -85,7 +85,7 @@ static INT ServiceActivate (LPTSTR param, HWND hWnd)
|
|||
tmp++;
|
||||
|
||||
pos.left= _ttoi(tmp);
|
||||
if(!(tmp=_tcschr(tmp, _T(','))))
|
||||
if (!(tmp=_tcschr(tmp, _T(','))))
|
||||
{
|
||||
error_invalid_parameter_format(p[i]);
|
||||
freep(p);
|
||||
|
@ -93,7 +93,7 @@ static INT ServiceActivate (LPTSTR param, HWND hWnd)
|
|||
}
|
||||
|
||||
pos.top = _ttoi (++tmp);
|
||||
if(!(tmp=_tcschr(tmp, _T(','))))
|
||||
if (!(tmp=_tcschr(tmp, _T(','))))
|
||||
{
|
||||
error_invalid_parameter_format(p[i]);
|
||||
freep(p);
|
||||
|
@ -198,25 +198,25 @@ INT CommandActivate (LPTSTR param)
|
|||
return 0;
|
||||
}
|
||||
|
||||
if(!(*param))
|
||||
if (!(*param))
|
||||
return 1;
|
||||
|
||||
/* Split the user input into array */
|
||||
arg = split (param, &argc, FALSE);
|
||||
if(argc < 2)
|
||||
if (argc < 2)
|
||||
{
|
||||
if(arg != NULL)
|
||||
if (arg != NULL)
|
||||
freep(arg);
|
||||
}
|
||||
hwnd = FindWindow(NULL, arg[0]);
|
||||
if (hwnd == NULL)
|
||||
{
|
||||
if(arg != NULL)
|
||||
if (arg != NULL)
|
||||
freep(arg);
|
||||
ConErrResPuts(STRING_WINDOW_ERROR1);
|
||||
return 1;
|
||||
}
|
||||
if(arg != NULL)
|
||||
if (arg != NULL)
|
||||
freep(arg);
|
||||
|
||||
return ServiceActivate(param, hwnd);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue