63a055038d5c0e7d35554a2f320c1edc3650f79e
[reactos.git] / reactos / subsys / system / cmd / verify.c
1 /*
2 * VERIFY.C - verify internal command.
3 *
4 *
5 * History:
6 *
7 * 31 Jul 1998 (John P Price)
8 * started.
9 *
10 * 18-Jan-1999 (Eric Kohl <ekohl@abo.rhein-zeitung.de>)
11 * VERIFY is just a dummy under Win32; it only exists
12 * for compatibility!!!
13 *
14 * 20-Jan-1999 (Eric Kohl <ekohl@abo.rhein-zeitung.de>)
15 * Unicode and redirection ready!
16 *
17 * 30-Apr-2005 (Magnus Olsen) <magnus@greatlord.com>)
18 * Remove all hardcode string to En.rc
19 */
20
21 #include "precomp.h"
22 #include "resource.h"
23
24 #ifdef INCLUDE_CMD_VERIFY
25
26
27 /* global verify flag */
28 static BOOL bVerify = FALSE;
29
30
31 INT cmd_verify (LPTSTR cmd, LPTSTR param)
32 {
33 TCHAR szMsg[RC_STRING_MAX_SIZE];
34
35 if (!_tcsncmp (param, _T("/?"), 2))
36 {
37 ConOutResPuts(STRING_VERIFY_HELP1);
38 return 0;
39 }
40
41 if (!*param)
42 {
43 LoadString(CMD_ModuleHandle, STRING_VERIFY_HELP2, szMsg, RC_STRING_MAX_SIZE);
44 ConOutPrintf((LPTSTR)szMsg, bVerify ? D_ON : D_OFF);
45 }
46 else if (_tcsicmp (param, D_OFF) == 0)
47 bVerify = FALSE;
48 else if (_tcsicmp (param, D_ON) == 0)
49 bVerify = TRUE;
50 else
51 {
52 ConOutResPuts(STRING_VERIFY_HELP3);
53 }
54
55 return 0;
56 }
57
58 #endif