-/* $Id: cmd.h,v 1.2 2003/06/01 17:06:22 hbirr Exp $
- *
+/*
* CMD.H - header file for the modules in CMD.EXE
*
*
#include "cmdver.h"
-#ifdef _MSC_VER
-#define SHELLVER "Version " CMD_VER " [" __DATE__ ", msc]"
-#else
-#ifdef __LCC__
-#define SHELLVER "Version " CMD_VER " [" __DATE__ ", lcc-win32]"
-#else
-#define SHELLVER "Version " CMD_VER " [" __DATE__ "]"
-#endif
-#endif
-
-
#define BREAK_BATCHFILE 1
#define BREAK_OUTOFBATCH 2
#define BREAK_INPUT 3
#define BREAK_IGNORE 4
/* define some error messages */
-#define NOENVERR "ERROR: no environment"
-#define INVALIDDRIVE "ERROR: invalid drive"
-#define INVALIDFUNCTION "ERROR: invalid function"
-#define ACCESSDENIED "ERROR: access denied"
-#define BADENVIROMENT "ERROR: bad enviroment"
-#define BADFORMAT "ERROR: bad format"
-#define ERROR_E2BIG "ERROR: Argument list too long"
-#define ERROR_EINVAL "ERROR: Invalid argument"
-
-#define SHELLINFO "ReactOS Command Line Interpreter"
-
-#define D_ON "on"
-#define D_OFF "off"
+#define D_ON _T("on")
+#define D_OFF _T("off")
/* command line buffer length */
VOID AddBreakHandler (VOID);
VOID RemoveBreakHandler (VOID);
+extern HANDLE CMD_ModuleHandle;
+
/* Prototypes for CMDINPUT.C */
VOID ReadCommand (LPTSTR, INT);
extern COMMAND cmds[]; /* The internal command table */
VOID PrintCommandList (VOID);
+VOID PrintCommandListDetail (VOID);
/* Prototypes for COLOR.C */
VOID ConErrChar (TCHAR);
VOID ConErrPuts (LPTSTR);
VOID ConErrPrintf (LPTSTR, ...);
+VOID ConOutFormatMessage (DWORD MessageId, ...);
SHORT GetCursorX (VOID);
SHORT GetCursorY (VOID);
VOID GetScreenSize (PSHORT, PSHORT);
VOID SetCursorType (BOOL, BOOL);
+VOID ConOutResPuts (UINT resID);
+VOID ConErrResPuts (UINT resID);
/* Prototypes for COPY.C */
INT cmd_copy (LPTSTR, LPTSTR);
VOID error_file_not_found (VOID);
VOID error_path_not_found (VOID);
VOID error_too_many_parameters (LPTSTR);
+VOID error_parameter_format(TCHAR);
VOID error_invalid_switch (TCHAR);
VOID error_invalid_parameter_format (LPTSTR);
VOID error_out_of_memory (VOID);
INT CommandExit (LPTSTR, LPTSTR);
INT CommandRem (LPTSTR, LPTSTR);
INT CommandShowCommands (LPTSTR, LPTSTR);
-
+INT CommandShowCommandsDetail (LPTSTR, LPTSTR);
/* Prototypes for LABEL.C */
INT cmd_label (LPTSTR, LPTSTR);
extern INT nDateFormat;
extern TCHAR cTimeSeparator;
extern INT nTimeFormat;
-extern TCHAR aszDayNames[7][8];
extern TCHAR cThousandSeparator;
extern TCHAR cDecimalSeparator;
-extern INT nNumberGroups;
+extern INT nNumberGroups;
+
VOID InitLocale (VOID);
VOID PrintDate (VOID);
VOID PrintTime (VOID);
+/* cache codepage */
+extern UINT InputCodePage;
+extern UINT OutputCodePage;
/* Prototypes for MEMORY.C */
INT CommandMemory (LPTSTR, LPTSTR);
BOOL CheckCtrlBreak (INT);
LPTSTR *split (LPTSTR, LPINT, BOOL);
VOID freep (LPTSTR *);
-LPTSTR stpcpy (LPTSTR, LPTSTR);
+LPTSTR _stpcpy (LPTSTR, LPTSTR);
BOOL IsValidPathName (LPCTSTR);
-BOOL IsValidFileName (LPCTSTR);
-BOOL IsValidDirectory (LPCTSTR);
+BOOL IsExistingFile (LPCTSTR);
+BOOL IsExistingDirectory (LPCTSTR);
BOOL FileGetString (HANDLE, LPTSTR, INT);
#ifndef __REACTOS__
HWND GetConsoleWindow(VOID);
/* The MSDOS Batch Commands [MS-DOS 5.0 User's Guide and Reference p359] */
-int cmd_if(char *, char *);
-int cmd_pause(char *, char *);
-int cmd_shift(char *, char *);
+int cmd_if(TCHAR *, TCHAR *);
+int cmd_pause(TCHAR *, TCHAR *);
+int cmd_shift(TCHAR *, TCHAR *);
#endif /* _CMD_H_INCLUDED_ */