Source code of Windows XP (NT5)
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.

69 lines
1.1 KiB

  1. /*++
  2. Copyright (c) 1998 Microsoft Corporation
  3. Module Name:
  4. help.c
  5. Abstract:
  6. This module implements the help system.
  7. Author:
  8. Wesley Witt (wesw) 21-Oct-1998
  9. Revision History:
  10. --*/
  11. #include "cmdcons.h"
  12. #pragma hdrstop
  13. BOOLEAN
  14. RcCmdParseHelp(
  15. IN PTOKENIZED_LINE TokenizedLine,
  16. ULONG MsgId
  17. )
  18. {
  19. BOOL doHelp = FALSE;
  20. PLINE_TOKEN Token;
  21. LPCWSTR Arg;
  22. if (TokenizedLine == NULL || TokenizedLine->Tokens == NULL ||
  23. TokenizedLine->Tokens->Next == NULL)
  24. {
  25. return FALSE;
  26. }
  27. // check for help
  28. Token = TokenizedLine->Tokens->Next;
  29. while(Token) {
  30. Arg = Token->String;
  31. if ((Arg[0] == L'/' || Arg[0] == L'-') && (Arg[1] == L'?' || Arg[1] == L'h' || Arg[1] == L'H')) {
  32. doHelp = TRUE;
  33. break;
  34. }
  35. Token = Token->Next;
  36. }
  37. if (doHelp) {
  38. RcMessageOut( MsgId );
  39. return TRUE;
  40. }
  41. return FALSE;
  42. }
  43. ULONG
  44. RcCmdHelpHelp(
  45. IN PTOKENIZED_LINE TokenizedLine
  46. )
  47. {
  48. RcMessageOut( MSG_HELPCOMMAND_HELP );
  49. return TRUE;
  50. }