adding page break on almost all help param and on help command.
authorMagnus Olsen <magnus@greatlord.com>
Thu, 7 Jul 2005 08:29:22 +0000 (08:29 +0000)
committerMagnus Olsen <magnus@greatlord.com>
Thu, 7 Jul 2005 08:29:22 +0000 (08:29 +0000)
svn path=/trunk/; revision=16477

41 files changed:
reactos/subsys/system/cmd/alias.c
reactos/subsys/system/cmd/attrib.c
reactos/subsys/system/cmd/beep.c
reactos/subsys/system/cmd/call.c
reactos/subsys/system/cmd/chcp.c
reactos/subsys/system/cmd/choice.c
reactos/subsys/system/cmd/cls.c
reactos/subsys/system/cmd/cmd.c
reactos/subsys/system/cmd/cmd.h
reactos/subsys/system/cmd/cmdtable.c
reactos/subsys/system/cmd/color.c
reactos/subsys/system/cmd/console.c
reactos/subsys/system/cmd/copy.c
reactos/subsys/system/cmd/date.c
reactos/subsys/system/cmd/del.c
reactos/subsys/system/cmd/delay.c
reactos/subsys/system/cmd/echo.c
reactos/subsys/system/cmd/for.c
reactos/subsys/system/cmd/free.c
reactos/subsys/system/cmd/goto.c
reactos/subsys/system/cmd/if.c
reactos/subsys/system/cmd/internal.c
reactos/subsys/system/cmd/label.c
reactos/subsys/system/cmd/memory.c
reactos/subsys/system/cmd/move.c
reactos/subsys/system/cmd/msgbox.c
reactos/subsys/system/cmd/path.c
reactos/subsys/system/cmd/pause.c
reactos/subsys/system/cmd/prompt.c
reactos/subsys/system/cmd/ren.c
reactos/subsys/system/cmd/screen.c
reactos/subsys/system/cmd/set.c
reactos/subsys/system/cmd/shift.c
reactos/subsys/system/cmd/start.c
reactos/subsys/system/cmd/time.c
reactos/subsys/system/cmd/title.c
reactos/subsys/system/cmd/type.c
reactos/subsys/system/cmd/ver.c
reactos/subsys/system/cmd/verify.c
reactos/subsys/system/cmd/vol.c
reactos/subsys/system/cmd/window.c

index 9c0d3c7..c4f910c 100644 (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;
        }
 
index 1e1c09f..62bd39b 100644 (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;
        }
 
index e0a48ad..bf2230a 100644 (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;
        }
 
index 167b09a..c79a6bb 100644 (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;
        }
 
index e07b046..a1903e0 100644 (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;
        }
 
index 4a01855..a0006fb 100644 (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;
        }
 
index d4b8ce9..ac3ce2d 100644 (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;
        }
 
index dccbcc1..dde407d 100644 (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);
index 95a9977..19f080c 100644 (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);
index 6e9fa30..fa66422 100644 (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 */
index 9541c7c..2f3dfb1 100644 (file)
 #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;
        }
 
index 2c0713f..03424d3 100644 (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];
index b494cb0..eb8e906 100644 (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;
        }
 
index 23e47ff..c398352 100644 (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;
        }
   
index 6f2b71a..198ead4 100644 (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;
        }
 
index 9d8202f..526a7bf 100644 (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;
        }
 
index d03558c..c12f1df 100644 (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;
        }
 
index da2d855..7e44279 100644 (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;
        }
 
index 3514ca6..4977e22 100644 (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;
        }
 
index ba54136..f099283 100644 (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;
        }
 
index cc69d9a..f875ef2 100644 (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;
        }
 
index 1ebeed7..c1a32cd 100644 (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;
index 8610f8c..bcaeb6d 100644 (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;
        }
 
index 0ea336e..997e1b5 100644 (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;
        }
 
index 33ee381..6d9a227 100644 (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;
        }
index 187d02f..8785f8e 100644 (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;
        }
 
index 41bcea1..1b37756 100644 (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;
        }
 
index a2839d0..d77a584 100644 (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;
        }
 
index d7dbf5c..985d358 100644 (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;
        }
 
index 593c8aa..3dae206 100644 (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;
   }
 
index 335d141..b40e9a5 100644 (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;
        }
 
index b1bc3a5..3452203 100644 (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;
        }
 
index 71b5f7f..339f45b 100644 (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;
        }
 
index d81e924..922fe5f 100644 (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;
        }
 
index 9a31554..04c79b1 100644 (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;
        }
 
index 15e0db4..b76f1cb 100644 (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;
        }
 
index 5710059..705ffbf 100644 (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;
        }
 
index 173403b..93a4c04 100644 (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;
        }
 
index f6b7f49..38ac166 100644 (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;
        }
 
index 09d7401..a8b57c8 100644 (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;
        }
 
index a7a7cf6..68e502e 100644 (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;
        }