ReactOS  0.4.15-dev-341-g17c5fb8
help.c File Reference
#include "diskpart.h"
Include dependency graph for help.c:

Go to the source code of this file.

Functions

VOID help_cmdlist (VOID)
 
BOOL help_main (INT argc, LPWSTR *argv)
 

Function Documentation

◆ help_cmdlist()

VOID help_cmdlist ( VOID  )

Definition at line 15 of file help.c.

16 {
17  PCOMMAND cmdptr;
18 
19  /* Print the header information */
21  ConPuts(StdOut, L"\n");
22 
23  /* List all the commands and the basic descriptions */
24  for (cmdptr = cmds; cmdptr->name; cmdptr++)
25  ConResPuts(StdOut, cmdptr->help_desc);
26 
27  ConPuts(StdOut, L"\n");
28 }
COMMAND cmds[]
Definition: main.c:21
INT help_desc
Definition: diskpart.h:56
INT ConResPuts(IN PCON_STREAM Stream, IN UINT uID)
Definition: outstream.c:610
static const WCHAR L[]
Definition: oid.c:1250
INT ConPuts(IN PCON_STREAM Stream, IN LPWSTR szStr)
Definition: outstream.c:427
#define IDS_APP_HEADER
Definition: resource.h:13
#define StdOut
Definition: stream.h:76
Definition: main.c:14
WCHAR * name
Definition: main.c:16

Referenced by help_main(), and InterpretCmd().

◆ help_main()

BOOL help_main ( INT  argc,
LPWSTR argv 
)

Definition at line 33 of file help.c.

34 {
35  PCOMMAND cmdptr;
36 
37  if (argc == 1)
38  {
39  help_cmdlist();
40  return TRUE;
41  }
42 
43  /* Scan internal command table */
44  for (cmdptr = cmds; cmdptr->name; cmdptr++)
45  {
46  if (_wcsicmp(argv[1], cmdptr->name) == 0)
47  {
48  ConResPuts(StdOut, cmdptr->help);
49  return TRUE;
50  }
51  }
52 
53  help_cmdlist();
54 
55  return TRUE;
56 }
static int argc
Definition: ServiceArgs.c:12
#define TRUE
Definition: types.h:120
COMMAND cmds[]
Definition: main.c:21
VOID help_cmdlist(VOID)
Definition: help.c:15
#define argv
Definition: mplay32.c:18
INT help
Definition: diskpart.h:55
INT ConResPuts(IN PCON_STREAM Stream, IN UINT uID)
Definition: outstream.c:610
#define StdOut
Definition: stream.h:76
Definition: main.c:14
_Check_return_ _CRTIMP int __cdecl _wcsicmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
WCHAR * name
Definition: main.c:16