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("\\"));
else
{
hFind = FindFirstFile(TempPath,&FindFileData);
- if(hFind == INVALID_HANDLE_VALUE)
+ if (hFind == INVALID_HANDLE_VALUE)
{
_tcscpy(OutPath, Path);
return;
c = _totupper(cgetchar());
} while (!(_tcschr(options, c) || c == _T('\3')) || !c);
- ConOutPuts (_T("\r\n"));
+ ConOutChar(_T('\n'));
if (c == options[1])
return bCtrlBreak = FALSE; /* ignore */
*arg = cmd_realloc (oldarg, (*ac + 2) * sizeof (LPTSTR));
if (NULL == *arg)
{
+ cmd_free (q);
*arg = oldarg;
return FALSE;
}
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')) &&
ConOutResPrintf (resID);
/* preliminary fix */
- ConInString (szIn, 10);
- ConOutPrintf (_T("\n"));
+ ConInString(szIn, 10);
+ ConOutChar(_T('\n'));
_tcsupr (szIn);
for (p = szIn; _istspace (*p); p++)
/* unfinished solution */
#if 0
- RemoveBreakHandler ();
- ConInDisable ();
+ RemoveBreakHandler();
+ ConInDisable();
do
{
(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') &&
ConOutResPrintf (resID);
/* preliminary fix */
- ConInString (szIn, 10);
- ConOutPrintf (_T("\n"));
+ ConInString(szIn, 10);
+ ConOutChar(_T('\n'));
_tcsupr (szIn);
for (p = szIn; _istspace (*p); p++)
/* unfinished solution */
#if 0
- RemoveBreakHandler ();
- ConInDisable ();
+ RemoveBreakHandler();
+ ConInDisable();
do
{
(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')) &&