Author: hbelusca
Date: Sat Sep 30 15:09:38 2017
New Revision: 76002
URL:
http://svn.reactos.org/svn/reactos?rev=76002&view=rev
Log:
[CMD]: Move console management prototypes to their own header.
Added:
trunk/reactos/base/shell/cmd/console.h (with props)
Modified:
trunk/reactos/base/shell/cmd/cmd.h
Modified: trunk/reactos/base/shell/cmd/cmd.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/cmd.h?rev=7…
==============================================================================
--- trunk/reactos/base/shell/cmd/cmd.h [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/cmd.h [iso-8859-1] Sat Sep 30 15:09:38 2017
@@ -40,7 +40,6 @@
#define BREAK_IGNORE 4
/* define some error messages */
-
#define D_ON _T("on")
#define D_OFF _T("off")
@@ -78,11 +77,9 @@
/* Prototypes for ATTRIB.C */
INT CommandAttrib (LPTSTR);
-
/* Prototypes for BEEP.C */
INT cmd_beep (LPTSTR);
-
/* Prototypes for CALL.C */
INT cmd_call (LPTSTR);
@@ -90,10 +87,8 @@
/* Prototypes for CHOICE.C */
INT CommandChoice (LPTSTR);
-
/* Prototypes for CLS.C */
INT cmd_cls (LPTSTR);
-
/* Prototypes for CMD.C */
INT ConvertULargeInteger(ULONGLONG num, LPTSTR des, UINT len, BOOL bPutSeparator);
@@ -145,76 +140,25 @@
/* Prototypes for COLOR.C */
INT CommandColor(LPTSTR);
-VOID ConInDummy (VOID);
-VOID ConInDisable (VOID);
-VOID ConInEnable (VOID);
-VOID ConInFlush (VOID);
-VOID ConInKey (PINPUT_RECORD);
-VOID ConInString (LPTSTR, DWORD);
-
-VOID ConOutChar (TCHAR);
-VOID ConOutPuts (LPTSTR);
-VOID ConPrintf(LPTSTR, va_list, DWORD);
-INT ConPrintfPaging(BOOL NewPage, LPTSTR, va_list, DWORD);
-VOID ConOutPrintf (LPTSTR, ...);
-INT ConOutPrintfPaging (BOOL NewPage, LPTSTR, ...);
-VOID ConErrChar (TCHAR);
-VOID ConErrPuts (LPTSTR);
-VOID ConErrPrintf (LPTSTR, ...);
-VOID ConOutFormatMessage (DWORD MessageId, ...);
-VOID ConErrFormatMessage (DWORD MessageId, ...);
-
-SHORT GetCursorX (VOID);
-SHORT GetCursorY (VOID);
-VOID GetCursorXY (PSHORT, PSHORT);
-VOID SetCursorXY (SHORT, SHORT);
-
-VOID GetScreenSize (PSHORT, PSHORT);
-VOID SetCursorType (BOOL, BOOL);
-
-VOID ConOutResPuts (UINT resID);
-VOID ConErrResPuts (UINT resID);
-VOID ConOutResPrintf (UINT resID, ...);
-VOID ConErrResPrintf (UINT resID, ...);
-VOID ConOutResPaging(BOOL NewPage, UINT resID);
-
-
-BOOL ConSetTitle(IN LPCTSTR lpConsoleTitle);
-
-#ifdef INCLUDE_CMD_BEEP
-VOID ConRingBell(HANDLE hOutput);
-#endif
-
-#ifdef INCLUDE_CMD_CLS
-VOID ConClearScreen(HANDLE hOutput);
-#endif
-
-#ifdef INCLUDE_CMD_COLOR
-BOOL ConSetScreenColor(WORD wColor, BOOL bFill);
-#endif
-
+/* Prototypes for CONSOLE.C */
+#include "console.h"
/* Prototypes for COPY.C */
INT cmd_copy (LPTSTR);
-
/* Prototypes for DATE.C */
INT cmd_date (LPTSTR);
-
/* Prototypes for DEL.C */
INT CommandDelete (LPTSTR);
-
/* Prototypes for DELAY.C */
INT CommandDelay (LPTSTR);
-
/* Prototypes for DIR.C */
INT FormatDate (TCHAR *, LPSYSTEMTIME, BOOL);
INT FormatTime (TCHAR *, LPSYSTEMTIME);
INT CommandDir (LPTSTR);
-
/* Prototypes for DIRSTACK.C */
VOID InitDirectoryStack (VOID);
@@ -224,14 +168,12 @@
INT CommandPopd (LPTSTR);
INT CommandDirs (LPTSTR);
-
/* Prototypes for ECHO.C */
BOOL OnOffCommand(LPTSTR param, LPBOOL flag, INT message);
INT CommandEcho (LPTSTR);
INT CommandEchos (LPTSTR);
INT CommandEchoerr (LPTSTR);
INT CommandEchoserr (LPTSTR);
-
/* Prototypes for ERROR.C */
VOID ErrorMessage (DWORD, LPTSTR, ...);
@@ -252,7 +194,6 @@
VOID msg_pause (VOID);
-
/* Prototypes for FILECOMP.C */
#ifdef FEATURE_UNIX_FILENAME_COMPLETION
VOID CompleteFilename (LPTSTR, UINT);
@@ -275,10 +216,8 @@
/* Prototypes for FREE.C */
INT CommandFree (LPTSTR);
-
/* Prototypes for GOTO.C */
INT cmd_goto (LPTSTR);
-
/* Prototypes for HISTORY.C */
#ifdef FEATURE_HISTORY
@@ -291,7 +230,6 @@
INT CommandHistory (LPTSTR param);
#endif
-
/* Prototypes for IF.C */
#define IFFLAG_NEGATE 1 /* NOT */
#define IFFLAG_IGNORECASE 2 /* /I */
@@ -299,7 +237,6 @@
IF_STRINGEQ, /* == */
IF_EQU, IF_GTR, IF_GEQ, IF_LSS, IF_LEQ, IF_NEQ };
INT ExecuteIf(struct _PARSED_COMMAND *Cmd);
-
/* Prototypes for INTERNAL.C */
VOID InitLastPath (VOID);
@@ -314,7 +251,6 @@
/* Prototypes for LABEL.C */
INT cmd_label (LPTSTR);
-
/* Prototypes for LOCALE.C */
extern TCHAR cDateSeparator;
extern INT nDateFormat;
@@ -324,22 +260,15 @@
extern TCHAR cDecimalSeparator;
extern INT nNumberGroups;
-
VOID InitLocale (VOID);
LPTSTR GetDateString (VOID);
LPTSTR GetTimeString (VOID);
-/* cache codepage */
-extern UINT InputCodePage;
-extern UINT OutputCodePage;
-
/* Prototypes for MEMORY.C */
INT CommandMemory (LPTSTR);
-
/* Prototypes for MKLINK.C */
INT cmd_mklink(LPTSTR);
-
/* Prototypes for MISC.C */
INT GetRootPath(TCHAR *InPath,TCHAR *OutPath,INT size);
@@ -367,14 +296,11 @@
INT FilePromptYN (UINT);
INT FilePromptYNA (UINT);
-
/* Prototypes for MOVE.C */
INT cmd_move (LPTSTR);
-
/* Prototypes for MSGBOX.C */
INT CommandMsgbox (LPTSTR);
-
/* Prototypes from PARSER.C */
enum { C_COMMAND, C_QUIET, C_BLOCK, C_MULTI, C_IFFAILURE, C_IFSUCCESS, C_PIPE, C_IF,
C_FOR };
@@ -413,16 +339,13 @@
TCHAR *Unparse(PARSED_COMMAND *Cmd, TCHAR *Out, TCHAR *OutEnd);
VOID FreeCommand(PARSED_COMMAND *Cmd);
-
/* Prototypes from PATH.C */
INT cmd_path (LPTSTR);
-
/* Prototypes from PROMPT.C */
VOID InitPrompt (VOID);
VOID PrintPrompt (VOID);
INT cmd_prompt (LPTSTR);
-
/* Prototypes for REDIR.C */
typedef enum _REDIR_MODE
@@ -444,7 +367,6 @@
INT GetRedirection(LPTSTR, REDIRECTION **);
VOID FreeRedirection(REDIRECTION *);
-
/* Prototypes for REN.C */
INT cmd_rename (LPTSTR);
@@ -453,7 +375,6 @@
/* Prototypes for SCREEN.C */
INT CommandScreen (LPTSTR);
-
/* Prototypes for SET.C */
INT cmd_set (LPTSTR);
@@ -466,40 +387,31 @@
/* Prototypes for START.C */
INT cmd_start (LPTSTR);
-
/* Prototypes for STRTOCLR.C */
BOOL StringToColor (LPWORD, LPTSTR *);
-
/* Prototypes for TIME.C */
INT cmd_time (LPTSTR);
-
/* Prototypes for TIMER.C */
INT CommandTimer (LPTSTR param);
-
/* Prototypes for TITLE.C */
INT cmd_title (LPTSTR);
-
/* Prototypes for TYPE.C */
INT cmd_type (LPTSTR);
-
/* Prototypes for VER.C */
VOID InitOSVersion(VOID);
VOID PrintOSVersion(VOID);
INT cmd_ver (LPTSTR);
-
/* Prototypes for VERIFY.C */
INT cmd_verify (LPTSTR);
-
/* Prototypes for VOL.C */
INT cmd_vol (LPTSTR);
-
/* Prototypes for WHERE.C */
BOOL SearchForExecutable (LPCTSTR, LPTSTR);
@@ -507,7 +419,6 @@
/* Prototypes for WINDOW.C */
INT CommandActivate (LPTSTR);
INT CommandWindow (LPTSTR);
-
/* The MSDOS Batch Commands [MS-DOS 5.0 User's Guide and Reference p359] */
int cmd_if(TCHAR *);
Added: trunk/reactos/base/shell/cmd/console.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/console.h?r…
==============================================================================
--- trunk/reactos/base/shell/cmd/console.h (added)
+++ trunk/reactos/base/shell/cmd/console.h [iso-8859-1] Sat Sep 30 15:09:38 2017
@@ -0,0 +1,71 @@
+
+#pragma once
+
+/* Cache codepage */
+extern UINT InputCodePage;
+extern UINT OutputCodePage;
+
+// /* Global variables */
+// extern BOOL bCtrlBreak;
+// extern BOOL bIgnoreEcho;
+// extern BOOL bExit;
+
+VOID ConInDummy (VOID);
+VOID ConInDisable (VOID);
+VOID ConInEnable (VOID);
+VOID ConInFlush (VOID);
+VOID ConInKey (PINPUT_RECORD);
+VOID ConInString (LPTSTR, DWORD);
+
+VOID ConOutChar (TCHAR);
+VOID ConOutPuts (LPTSTR);
+VOID ConPrintf(LPTSTR, va_list, DWORD);
+INT ConPrintfPaging(BOOL NewPage, LPTSTR, va_list, DWORD);
+VOID ConOutPrintf (LPTSTR, ...);
+INT ConOutPrintfPaging (BOOL NewPage, LPTSTR, ...);
+VOID ConErrChar (TCHAR);
+VOID ConErrPuts (LPTSTR);
+VOID ConErrPrintf (LPTSTR, ...);
+VOID ConOutFormatMessage (DWORD MessageId, ...);
+VOID ConErrFormatMessage (DWORD MessageId, ...);
+
+SHORT GetCursorX (VOID);
+SHORT GetCursorY (VOID);
+VOID GetCursorXY (PSHORT, PSHORT);
+VOID SetCursorXY (SHORT, SHORT);
+
+VOID GetScreenSize (PSHORT, PSHORT);
+VOID SetCursorType (BOOL, BOOL);
+
+VOID ConOutResPuts (UINT resID);
+VOID ConErrResPuts (UINT resID);
+VOID ConOutResPrintf (UINT resID, ...);
+VOID ConErrResPrintf (UINT resID, ...);
+VOID ConOutResPaging(BOOL NewPage, UINT resID);
+
+
+BOOL ConSetTitle(IN LPCTSTR lpConsoleTitle);
+
+#ifdef INCLUDE_CMD_BEEP
+VOID ConRingBell(HANDLE hOutput);
+#endif
+
+#ifdef INCLUDE_CMD_CLS
+VOID ConClearScreen(HANDLE hOutput);
+#endif
+
+#ifdef INCLUDE_CMD_COLOR
+BOOL ConSetScreenColor(WORD wColor, BOOL bFill);
+#endif
+
+// TCHAR cgetchar (VOID);
+// BOOL CheckCtrlBreak (INT);
+
+// #define PROMPT_NO 0
+// #define PROMPT_YES 1
+// #define PROMPT_ALL 2
+// #define PROMPT_BREAK 3
+
+// INT PagePrompt (VOID);
+// INT FilePromptYN (UINT);
+// INT FilePromptYNA (UINT);
Propchange: trunk/reactos/base/shell/cmd/console.h
------------------------------------------------------------------------------
svn:eol-style = native