cmd update:
[reactos.git] / reactos / subsys / system / cmd / cmd.h
index d68e167..936d8ad 100644 (file)
@@ -1,5 +1,4 @@
-/* $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 */
@@ -125,6 +102,8 @@ VOID ParseCommandLine (LPTSTR);
 VOID AddBreakHandler (VOID);
 VOID RemoveBreakHandler (VOID);
 
+extern HANDLE CMD_ModuleHandle;
+
 
 /* Prototypes for CMDINPUT.C */
 VOID ReadCommand (LPTSTR, INT);
@@ -145,6 +124,7 @@ typedef struct tagCOMMAND
 extern COMMAND cmds[];         /* The internal command table */
 
 VOID PrintCommandList (VOID);
+VOID PrintCommandListDetail (VOID);
 
 
 /* Prototypes for COLOR.C */
@@ -170,6 +150,7 @@ VOID ConOutPrintf (LPTSTR, ...);
 VOID ConErrChar (TCHAR);
 VOID ConErrPuts (LPTSTR);
 VOID ConErrPrintf (LPTSTR, ...);
+VOID ConOutFormatMessage (DWORD MessageId, ...);
 
 SHORT GetCursorX  (VOID);
 SHORT GetCursorY  (VOID);
@@ -179,6 +160,8 @@ VOID  SetCursorXY (SHORT, SHORT);
 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);
@@ -227,6 +210,7 @@ VOID error_sfile_not_found (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);
@@ -276,7 +260,7 @@ INT  cmd_rmdir (LPTSTR, LPTSTR);
 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);
@@ -287,15 +271,18 @@ extern TCHAR cDateSeparator;
 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);
@@ -306,10 +293,10 @@ TCHAR  cgetchar (VOID);
 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);
@@ -409,8 +396,8 @@ INT CommandWindow (LPTSTR, LPTSTR);
 
 
 /* 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_ */