You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
76 lines
1.3 KiB
76 lines
1.3 KiB
/*++
|
|
|
|
Copyright (c) 1998 Microsoft Corporation
|
|
|
|
Module Name:
|
|
|
|
help.c
|
|
|
|
Abstract:
|
|
|
|
This module implements the help system.
|
|
|
|
Author:
|
|
|
|
Wesley Witt (wesw) 21-Oct-1998
|
|
|
|
Revision History:
|
|
|
|
--*/
|
|
|
|
#include "cmdcons.h"
|
|
#pragma hdrstop
|
|
|
|
|
|
|
|
BOOLEAN
|
|
RcCmdParseHelp(
|
|
IN PTOKENIZED_LINE TokenizedLine,
|
|
ULONG MsgId
|
|
)
|
|
{
|
|
BOOL doHelp = FALSE;
|
|
PLINE_TOKEN Token;
|
|
LPCWSTR Arg;
|
|
|
|
|
|
if (TokenizedLine == NULL || TokenizedLine->Tokens == NULL ||
|
|
TokenizedLine->Tokens->Next == NULL)
|
|
{
|
|
return FALSE;
|
|
}
|
|
|
|
// check for help
|
|
Token = TokenizedLine->Tokens->Next;
|
|
while(Token) {
|
|
Arg = Token->String;
|
|
if ((Arg[0] == L'/' || Arg[0] == L'-') && (Arg[1] == L'?' || Arg[1] == L'h' || Arg[1] == L'H')) {
|
|
doHelp = TRUE;
|
|
break;
|
|
}
|
|
Token = Token->Next;
|
|
}
|
|
|
|
if (doHelp) {
|
|
//
|
|
// Enable more mode since the help text can be quile long sometimes
|
|
//
|
|
pRcEnableMoreMode();
|
|
RcMessageOut( MsgId );
|
|
pRcDisableMoreMode();
|
|
return TRUE;
|
|
}
|
|
|
|
return FALSE;
|
|
}
|
|
|
|
ULONG
|
|
RcCmdHelpHelp(
|
|
IN PTOKENIZED_LINE TokenizedLine
|
|
)
|
|
{
|
|
pRcEnableMoreMode();
|
|
RcMessageOut( MSG_HELPCOMMAND_HELP );
|
|
pRcDisableMoreMode();
|
|
return TRUE;
|
|
}
|