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.

121 lines
1.8 KiB

  1. /*++
  2. Copyright (C) Microsoft Corporation, 1997 - 1997
  3. All rights reserved.
  4. Module Name:
  5. parser.cxx
  6. Abstract:
  7. Command line parser header.
  8. Author:
  9. Steve Kiraly (SteveKi) 29-Sept-1996
  10. Revision History:
  11. --*/
  12. #ifndef _PARSER_HXX
  13. #define _PARSER_HXX
  14. /********************************************************************
  15. File info structure used for command file redirection.
  16. ********************************************************************/
  17. struct AFileInfo {
  18. PVOID pData; // File data
  19. LPTSTR pszOffset; // Offset to usable data
  20. };
  21. /********************************************************************
  22. Function prototypes.
  23. ********************************************************************/
  24. static
  25. PVOID
  26. private_alloc(
  27. UINT size
  28. );
  29. static
  30. VOID
  31. private_free(
  32. PVOID pvoid
  33. );
  34. BOOL
  35. StringToArgv(
  36. const TCHAR *string,
  37. UINT *pac,
  38. TCHAR ***pppav,
  39. BOOL bParseExeName
  40. );
  41. VOID
  42. ReleaseArgv(
  43. TCHAR **av
  44. );
  45. BOOL
  46. IsolateProgramName(
  47. const TCHAR *p,
  48. TCHAR *program_name,
  49. TCHAR **string
  50. );
  51. BOOL
  52. AddStringToArgv(
  53. TCHAR ***argv,
  54. TCHAR *word
  55. );
  56. VOID
  57. vProcessCommandFileRedirection(
  58. IN LPCTSTR pszCmdLine,
  59. IN OUT TString &strCmdLine
  60. );
  61. BOOL
  62. bFlushBuffer(
  63. IN LPCTSTR pszBuffer,
  64. IN UINT nSize,
  65. IN OUT LPTSTR *pszCurrent,
  66. IN OUT TString &strDestination,
  67. IN BOOL bForceFlush
  68. );
  69. BOOL
  70. bReadCommandFileRedirection(
  71. IN LPCTSTR szFilename,
  72. IN AFileInfo *pFileInfo
  73. );
  74. VOID
  75. vReplaceNewLines(
  76. IN LPTSTR pszLine
  77. );
  78. INT
  79. AnsiToUnicodeString(
  80. IN LPSTR pAnsi,
  81. IN LPWSTR pUnicode,
  82. IN DWORD StringLength
  83. );
  84. #if DBG
  85. VOID
  86. vDumpArgList(
  87. UINT ac,
  88. TCHAR **av
  89. );
  90. #endif
  91. #endif