adding page break on almost all help param and on help command.

svn path=/trunk/; revision=16477
This commit is contained in:
Magnus Olsen 2005-07-07 08:29:22 +00:00
parent c296b39f61
commit d1c9fb08f5
41 changed files with 57 additions and 53 deletions

View file

@ -308,7 +308,7 @@ INT CommandAlias (LPTSTR cmd, LPTSTR param)
if (!_tcsncmp (param, _T("/?"), 2))
{
ConOutResPuts(STRING_ALIAS_HELP);
ConOutResPaging(TRUE,STRING_ALIAS_HELP);
return 0;
}

View file

@ -205,7 +205,7 @@ INT CommandAttrib (LPTSTR cmd, LPTSTR param)
/* print help */
if (!_tcsncmp (param, _T("/?"), 2))
{
ConOutResPuts(STRING_ATTRIB_HELP);
ConOutResPaging(TRUE,STRING_ATTRIB_HELP);
return 0;
}

View file

@ -34,7 +34,7 @@ INT cmd_beep (LPTSTR cmd, LPTSTR param)
{
if (_tcsncmp (param, _T("/?"), 2) == 0)
{
ConOutResPuts(STRING_BEEP_HELP);
ConOutResPaging(TRUE,STRING_BEEP_HELP);
return 0;
}

View file

@ -50,7 +50,7 @@ INT cmd_call (LPTSTR cmd, LPTSTR param)
#endif
if (!_tcsncmp (param, _T("/?"), 2))
{
ConOutResPuts(STRING_CALL_HELP);
ConOutResPaging(TRUE,STRING_CALL_HELP);
return 0;
}

View file

@ -28,7 +28,7 @@ INT CommandChcp (LPTSTR cmd, LPTSTR param)
/* print help */
if (!_tcsncmp (param, _T("/?"), 2))
{
ConOutResPuts(STRING_CHCP_HELP);
ConOutResPaging(TRUE,STRING_CHCP_HELP);
return 0;
}

View file

@ -128,7 +128,7 @@ CommandChoice (LPTSTR cmd, LPTSTR param)
if (_tcsncmp (param, _T("/?"), 2) == 0)
{
ConOutResPuts(STRING_CHOICE_HELP);
ConOutResPaging(TRUE,STRING_CHOICE_HELP);
return 0;
}

View file

@ -39,7 +39,7 @@ INT cmd_cls (LPTSTR cmd, LPTSTR param)
if (!_tcsncmp (param, _T("/?"), 2))
{
ConOutResPuts(STRING_CLS_HELP);
ConOutResPaging(TRUE,STRING_CLS_HELP);
return 0;
}

View file

@ -1186,7 +1186,7 @@ Initialize (int argc, TCHAR* argv[])
if (argc >= 2 && !_tcsncmp (argv[1], _T("/?"), 2))
{
ConOutResPuts(STRING_CMD_HELP8);
ConOutResPaging(TRUE,STRING_CMD_HELP8);
ExitProcess(0);
}
SetConsoleMode (hIn, ENABLE_PROCESSED_INPUT);

View file

@ -163,6 +163,7 @@ VOID SetCursorType (BOOL, BOOL);
VOID ConOutResPuts (UINT resID);
VOID ConErrResPuts (UINT resID);
VOID ConOutResPaging(BOOL NewPage, UINT resID);
/* Prototypes for COPY.C */
INT cmd_copy (LPTSTR, LPTSTR);

View file

@ -262,8 +262,8 @@ VOID PrintCommandList (VOID)
VOID PrintCommandListDetail (VOID)
{
ConOutResPuts(STRING_HELP1);
ConOutResPuts(STRING_HELP2);
ConOutResPaging(TRUE,STRING_HELP1);
ConOutResPaging(FALSE,STRING_HELP2);
}
/* EOF */

View file

@ -26,10 +26,7 @@
#ifdef INCLUDE_CMD_COLOR
static VOID ColorHelp (VOID)
{
ConOutResPuts(STRING_COLOR_HELP1);
}
VOID SetScreenColor (WORD wColor, BOOL bNoFill)
@ -73,7 +70,7 @@ INT CommandColor (LPTSTR first, LPTSTR rest)
if (_tcsncmp (rest, _T("/?"), 2) == 0)
{
ColorHelp ();
ConOutResPaging(TRUE,STRING_COLOR_HELP1);
return 0;
}

View file

@ -187,6 +187,13 @@ VOID ConPuts(LPTSTR szText, DWORD nStdHandle)
#endif
}
VOID ConOutResPaging(BOOL NewPage, UINT resID)
{
TCHAR szMsg[RC_STRING_MAX_SIZE];
LoadString(CMD_ModuleHandle, resID, szMsg, RC_STRING_MAX_SIZE);
ConOutPrintfPaging(NewPage, szMsg);
}
VOID ConOutResPuts (UINT resID)
{
TCHAR szMsg[RC_STRING_MAX_SIZE];

View file

@ -647,7 +647,7 @@ INT cmd_copy (LPTSTR first, LPTSTR rest)
if (!_tcsncmp (rest, _T("/?"), 2))
{
ConOutResPuts(STRING_COPY_HELP2);
ConOutResPaging(TRUE,STRING_COPY_HELP2);
return 1;
}

View file

@ -192,7 +192,7 @@ INT cmd_date (LPTSTR cmd, LPTSTR param)
if (!_tcsncmp (param, _T("/?"), 2))
{
ConOutResPuts(STRING_DATE_HELP4);
ConOutResPaging(TRUE,STRING_DATE_HELP4);
return 0;
}

View file

@ -169,7 +169,7 @@ INT CommandDelete (LPTSTR cmd, LPTSTR param)
if (!_tcsncmp (param, _T("/?"), 2))
{
ConOutResPuts(STRING_DEL_HELP1);
ConOutResPaging(TRUE,STRING_DEL_HELP1);
return 0;
}

View file

@ -22,7 +22,7 @@ INT CommandDelay (LPTSTR cmd, LPTSTR param)
if (_tcsncmp (param, _T("/?"), 2) == 0)
{
ConOutResPuts(STRING_DELAY_HELP);
ConOutResPaging(TRUE,STRING_DELAY_HELP);
return 0;
}

View file

@ -40,7 +40,7 @@ INT CommandEcho (LPTSTR cmd, LPTSTR param)
if (!_tcsncmp (param, _T("/?"), 2))
{
ConOutResPuts(STRING_ECHO_HELP4);
ConOutResPaging(TRUE,STRING_ECHO_HELP4);
return 0;
}

View file

@ -61,7 +61,7 @@ INT cmd_for (LPTSTR cmd, LPTSTR param)
if (!_tcsncmp (param, _T("/?"), 2))
{
ConOutResPuts(STRING_FOR_HELP1);
ConOutResPaging(TRUE,STRING_FOR_HELP1);
return 0;
}

View file

@ -135,7 +135,7 @@ INT CommandFree (LPTSTR cmd, LPTSTR param)
if (!_tcsncmp (param, _T("/?"), 2))
{
ConOutResPuts(STRING_FREE_HELP2);
ConOutResPaging(TRUE,STRING_FREE_HELP2);
return 0;
}

View file

@ -48,9 +48,8 @@ INT cmd_goto (LPTSTR cmd, LPTSTR param)
#endif
if (!_tcsncmp (param, _T("/?"), 2))
{
LoadString(CMD_ModuleHandle, STRING_GOTO_HELP1, szMsg, RC_STRING_MAX_SIZE);
ConOutResPuts(STRING_GOTO_HELP1);
{
ConOutResPaging(TRUE,STRING_GOTO_HELP1);
return 0;
}

View file

@ -48,7 +48,7 @@ INT cmd_if (LPTSTR cmd, LPTSTR param)
if (!_tcsncmp (param, _T("/?"), 2))
{
ConOutResPuts(STRING_IF_HELP1);
ConOutResPaging(TRUE,STRING_IF_HELP1);
return 0;
}

View file

@ -168,7 +168,7 @@ INT cmd_chdir (LPTSTR cmd, LPTSTR param)
if (!_tcsncmp (param, _T("/?"), 2))
{
ConOutResPuts(STRING_CD_HELP);
ConOutResPaging(TRUE,STRING_CD_HELP);
return 0;
}
@ -351,7 +351,7 @@ INT cmd_mkdir (LPTSTR cmd, LPTSTR param)
if (!_tcsncmp (param, _T("/?"), 2))
{
ConOutResPuts(STRING_MKDIR_HELP);
ConOutResPaging(TRUE,STRING_MKDIR_HELP);
return 0;
}
@ -424,7 +424,7 @@ INT cmd_rmdir (LPTSTR cmd, LPTSTR param)
if (!_tcsncmp (param, _T("/?"), 2))
{
ConOutResPuts(STRING_RMDIR_HELP);
ConOutResPaging(TRUE,STRING_RMDIR_HELP);
return 0;
}
@ -488,7 +488,7 @@ INT cmd_rmdir (LPTSTR cmd, LPTSTR param)
INT CommandExit (LPTSTR cmd, LPTSTR param)
{
if (!_tcsncmp (param, _T("/?"), 2))
ConOutResPuts(STRING_EXIT_HELP);
ConOutResPaging(TRUE,STRING_EXIT_HELP);
if (bc != NULL && _tcsnicmp(param,_T("/b"),2) == 0)
{
@ -517,7 +517,7 @@ INT CommandRem (LPTSTR cmd, LPTSTR param)
{
if (!_tcsncmp (param, _T("/?"), 2))
{
ConOutResPuts(STRING_REM_HELP);
ConOutResPaging(TRUE,STRING_REM_HELP);
}
return 0;

View file

@ -39,7 +39,7 @@ INT cmd_label (LPTSTR cmd, LPTSTR param)
/* print help */
if (!_tcsncmp (param, _T("/?"), 2))
{
ConOutResPuts(STRING_LABEL_HELP1);
ConOutResPaging(TRUE,STRING_LABEL_HELP1);
return 0;
}

View file

@ -68,7 +68,7 @@ INT CommandMemory (LPTSTR cmd, LPTSTR param)
if (!_tcsncmp (param, _T("/?"), 2))
{
ConOutResPuts(STRING_MEMMORY_HELP1);
ConOutResPaging(TRUE,STRING_MEMMORY_HELP1);
return 0;
}

View file

@ -86,7 +86,7 @@ INT cmd_move (LPTSTR cmd, LPTSTR param)
" /-Y\n"
"..."));
#else
ConOutResPuts(STRING_MOVE_HELP2);
ConOutResPaging(TRUE,STRING_MOVE_HELP2);
#endif
return 0;
}

View file

@ -44,7 +44,7 @@ INT CommandMsgbox (LPTSTR cmd, LPTSTR param)
if (_tcsncmp (param, _T("/?"), 2) == 0)
{
ConOutResPuts(STRING_MSGBOX_HELP);
ConOutResPaging(TRUE,STRING_MSGBOX_HELP);
return 0;
}

View file

@ -39,7 +39,7 @@ INT cmd_path (LPTSTR cmd, LPTSTR param)
if (!_tcsncmp (param, _T("/?"), 2))
{
ConOutResPuts(STRING_PATH_HELP1);
ConOutResPaging(TRUE,STRING_PATH_HELP1);
return 0;
}

View file

@ -44,7 +44,7 @@ INT cmd_pause (LPTSTR cmd, LPTSTR param)
if (!_tcsncmp (param, _T("/?"), 2))
{
ConOutResPuts(STRING_PAUSE_HELP1);
ConOutResPaging(TRUE,STRING_PAUSE_HELP1);
return 0;
}

View file

@ -184,12 +184,12 @@ INT cmd_prompt (LPTSTR cmd, LPTSTR param)
if (!_tcsncmp (param, _T("/?"), 2))
{
ConOutResPuts(STRING_PROMPT_HELP1);
ConOutResPaging(TRUE,STRING_PROMPT_HELP1);
#ifdef FEATURE_DIRECTORY_STACK
ConOutResPuts(STRING_PROMPT_HELP2);
ConOutResPaging(FALSE,STRING_PROMPT_HELP2);
#endif
ConOutResPuts(STRING_PROMPT_HELP3);
ConOutResPaging(FALSE,STRING_PROMPT_HELP3);
return 0;
}

View file

@ -62,7 +62,7 @@ INT cmd_rename (LPTSTR cmd, LPTSTR param)
if (!_tcsncmp(param, _T("/?"), 2))
{
ConOutResPuts(STRING_REN_HELP1);
ConOutResPaging(TRUE,STRING_REN_HELP1);
return 0;
}

View file

@ -24,7 +24,7 @@ INT CommandScreen (LPTSTR cmd, LPTSTR param)
if (_tcsncmp (param, _T("/?"), 2) == 0)
{
ConOutResPuts(STRING_SCREEN_HELP);
ConOutResPaging(TRUE,STRING_SCREEN_HELP);
return 0;
}

View file

@ -51,7 +51,7 @@ INT cmd_set (LPTSTR cmd, LPTSTR param)
if (!_tcsncmp (param, _T("/?"), 2))
{
ConOutResPuts(STRING_SET_HELP);
ConOutResPaging(TRUE,STRING_SET_HELP);
return 0;
}

View file

@ -46,7 +46,7 @@ INT cmd_shift (LPTSTR cmd, LPTSTR param)
if (!_tcsncmp (param, _T("/?"), 2))
{
ConOutResPuts(STRING_SHIFT_HELP);
ConOutResPaging(TRUE,STRING_SHIFT_HELP);
return 0;
}

View file

@ -25,7 +25,7 @@ INT cmd_start (LPTSTR first, LPTSTR rest)
if (_tcsncmp (rest, _T("/?"), 2) == 0)
{
ConOutResPuts(STRING_START_HELP1);
ConOutResPaging(TRUE,STRING_START_HELP1);
return 0;
}

View file

@ -140,7 +140,7 @@ INT cmd_time (LPTSTR cmd, LPTSTR param)
if (!_tcsncmp (param, _T("/?"), 2))
{
ConOutResPuts(STRING_TIME_HELP1);
ConOutResPaging(TRUE,STRING_TIME_HELP1);
return 0;
}

View file

@ -25,7 +25,7 @@ INT cmd_title (LPTSTR cmd, LPTSTR param)
/* Asking help? */
if (!_tcsncmp(param, _T("/?"), 2))
{
ConOutResPuts(STRING_TITLE_HELP);
ConOutResPaging(TRUE,STRING_TITLE_HELP);
return 0;
}

View file

@ -48,7 +48,7 @@ INT cmd_type (LPTSTR cmd, LPTSTR param)
if (!_tcsncmp (param, _T("/?"), 2))
{
ConOutResPuts(STRING_TYPE_HELP1);
ConOutResPaging(TRUE,STRING_TYPE_HELP1);
return 0;
}

View file

@ -67,7 +67,7 @@ INT cmd_ver (LPTSTR cmd, LPTSTR param)
if (_tcsstr (param, _T("/?")) != NULL)
{
ConOutResPuts(STRING_VERSION_HELP1);
ConOutResPaging(TRUE,STRING_VERSION_HELP1);
return 0;
}

View file

@ -34,7 +34,7 @@ INT cmd_verify (LPTSTR cmd, LPTSTR param)
if (!_tcsncmp (param, _T("/?"), 2))
{
ConOutResPuts(STRING_VERIFY_HELP1);
ConOutResPaging(TRUE,STRING_VERIFY_HELP1);
return 0;
}

View file

@ -73,7 +73,7 @@ INT cmd_vol (LPTSTR cmd, LPTSTR param)
if (!_tcsncmp (param, _T("/?"), 2))
{
ConOutResPuts(STRING_VOL_HELP4);
ConOutResPaging(TRUE,STRING_VOL_HELP4);
return 0;
}

View file

@ -183,7 +183,7 @@ INT CommandWindow (LPTSTR cmd, LPTSTR param)
if (_tcsncmp (param, _T("/?"), 2) == 0)
{
ConOutResPuts(STRING_WINDOW_HELP1);
ConOutResPaging(TRUE,STRING_WINDOW_HELP1);
return 0;
}
@ -200,7 +200,7 @@ INT CommandActivate (LPTSTR cmd, LPTSTR param)
if (_tcsncmp (param, _T("/?"), 2) == 0)
{
ConOutResPuts(STRING_WINDOW_HELP2);
ConOutResPaging(TRUE,STRING_WINDOW_HELP2);
return 0;
}