Leaked source code of windows server 2003
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.

133 lines
6.0 KiB

  1. /*** proto.h - Local function prototypes
  2. *
  3. * Copyright (c) 1996,1997 Microsoft Corporation
  4. * Author: Michael Tsang (MikeTs)
  5. * Created 09/07/96
  6. *
  7. * MODIFICATION HISTORY
  8. */
  9. #ifndef _PROTO_H
  10. #define _PROTO_H
  11. // asl.c
  12. int LOCAL ReadBinFile(PSZ pszFile, PBYTE *ppb, PDWORD pdwTableSig);
  13. VOID LOCAL PrintLogo(VOID);
  14. int LOCAL PrintHelp(char **ppszArg, PARGTYPE pAT);
  15. VOID LOCAL PrintUsage(VOID);
  16. // parseasl.c
  17. int LOCAL ParseASLFile(PSZ pszFile);
  18. int LOCAL ParseASLTerms(PTOKEN ptoken, int iNestLevel);
  19. BOOL LOCAL ValidateTermClass(DWORD dwTermClass, PCODEOBJ pcParent);
  20. int LOCAL ParseASLTerm(PTOKEN ptoken, int iNestLevel);
  21. int LOCAL ParseFieldList(PTOKEN ptoken);
  22. int LOCAL ParsePackageList(PTOKEN ptoken);
  23. int LOCAL ParseBuffList(PTOKEN ptoken);
  24. int LOCAL ParseDataList(PTOKEN ptoken, int icbDataSize);
  25. int LOCAL ParseArgs(PTOKEN ptoken, PASLTERM pterm, int iNumArgs);
  26. int LOCAL ParseUserTerm(PTOKEN ptoken, BOOL fNonMethodOK);
  27. int LOCAL ParseName(PTOKEN ptoken, BOOL fEncode);
  28. int LOCAL ParseSuperName(PTOKEN ptoken);
  29. int LOCAL MakeIntData(DWORD dwData, PCODEOBJ pc);
  30. int LOCAL GetIntData(PCODEOBJ pc, PDWORD pdwData);
  31. int LOCAL ParseData(PTOKEN ptoken);
  32. int LOCAL ParseInteger(PTOKEN ptoken, char c);
  33. int LOCAL ParseOpcode(PTOKEN ptoken, char c);
  34. int LOCAL ParseKeyword(PTOKEN ptoken, char chExpectType);
  35. int LOCAL ParseString(PTOKEN ptoken);
  36. int LOCAL ValidateObject(PTOKEN ptoken, PSZ pszName, char chActType,
  37. char chArgType);
  38. int LOCAL ValidateNSChkList(PNSCHK pnschkHead);
  39. int LOCAL QueueNSChk(PTOKEN ptoken, PSZ pszObjName, ULONG dwExpectedType,
  40. ULONG dwChkData);
  41. // aslterms.c
  42. int LOCAL DefinitionBlock(PTOKEN ptoken, BOOL fActionFL);
  43. int LOCAL Include(PTOKEN ptoken, BOOL fActionFL);
  44. int LOCAL External(PTOKEN ptoken, BOOL fActionFL);
  45. int LOCAL Method(PTOKEN ptoken, BOOL fActionFL);
  46. int LOCAL Alias(PTOKEN ptoken, BOOL fActionFL);
  47. int LOCAL Name(PTOKEN ptoken, BOOL fActionFL);
  48. int LOCAL Scope(PTOKEN ptoken, BOOL fActionFL);
  49. int LOCAL Field(PTOKEN ptoken, BOOL fActionFL);
  50. int LOCAL IndexField(PTOKEN ptoken, BOOL fActionFL);
  51. int LOCAL BankField(PTOKEN ptoken, BOOL fActionFL);
  52. int LOCAL OpRegion(PTOKEN ptoken, BOOL fActionFL);
  53. int LOCAL EISAID(PTOKEN ptoken, BOOL fActionFL);
  54. int LOCAL Match(PTOKEN ptoken, BOOL fActionFL);
  55. int LOCAL AccessAs(PTOKEN ptoken, BOOL fActionFL);
  56. int LOCAL Else(PTOKEN ptoken, BOOL fActionFL);
  57. // pnpmacro.c
  58. int LOCAL XferCodeToBuff(PBYTE pbBuff, PDWORD pdwcb, PCODEOBJ pcCode);
  59. int LOCAL ResourceTemplate(PTOKEN ptoken, BOOL fActionFL);
  60. int LOCAL AddSmallOffset(PTOKEN ptoken, BOOL fActionFL);
  61. int LOCAL StartDependentFn(PTOKEN ptoken, BOOL fActionFL);
  62. int LOCAL IRQDesc(PTOKEN ptoken, BOOL fActionFL);
  63. int LOCAL DMADesc(PTOKEN ptoken, BOOL fActionFL);
  64. int LOCAL IODesc(PTOKEN ptoken, BOOL fActionFL);
  65. int LOCAL FixedIODesc(PTOKEN ptoken, BOOL fActionFL);
  66. int LOCAL VendorDesc(PTOKEN ptoken, DWORD dwMaxSize);
  67. int LOCAL VendorShort(PTOKEN ptoken, BOOL fActionFL);
  68. int LOCAL InsertDescLength(PCODEOBJ pcode, DWORD dwDescLen);
  69. int LOCAL Memory24Desc(PTOKEN ptoken, BOOL fActionFL);
  70. int LOCAL VendorLong(PTOKEN ptoken, BOOL fActionFL);
  71. int LOCAL Memory32Desc(PTOKEN ptoken, BOOL fActionFL);
  72. int LOCAL FixedMemory32Desc(PTOKEN ptoken, BOOL fActionFL);
  73. int LOCAL MemSpaceDesc(PTOKEN ptoken, DWORD dwMinLen, PRESFIELD ResFields);
  74. int LOCAL IOSpaceDesc(PTOKEN ptoken, DWORD dwMinLen, PRESFIELD ResFields);
  75. int LOCAL DWordMemDesc(PTOKEN ptoken, BOOL fActionFL);
  76. int LOCAL DWordIODesc(PTOKEN ptoken, BOOL fActionFL);
  77. int LOCAL WordIODesc(PTOKEN ptoken, BOOL fActionFL);
  78. int LOCAL WordBusNumDesc(PTOKEN ptoken, BOOL fActionFL);
  79. int LOCAL InterruptDesc(PTOKEN ptoken, BOOL fActionFL);
  80. int LOCAL QWordMemDesc(PTOKEN ptoken, BOOL fActionFL);
  81. int LOCAL QWordIODesc(PTOKEN ptoken, BOOL fActionFL);
  82. int LOCAL CreateResFields(PTOKEN ptoken, PNSOBJ pnsParent, PRESFIELD prf);
  83. // misc.c
  84. BOOL LOCAL ValidASLNameSeg(PTOKEN ptoken, PSZ pszToken, int icbLen);
  85. BOOL LOCAL ValidASLName(PTOKEN ptoken, PSZ pszToken);
  86. int LOCAL EncodeName(PSZ pszName, PBYTE pbBuff, PDWORD pdwLen);
  87. int LOCAL EncodePktLen(DWORD dwCodeLen, PDWORD pdwPktLen, PINT picbEncoding);
  88. VOID LOCAL EncodeKeywords(PCODEOBJ pArgs, DWORD dwSrcArgs, int iDstArgNum);
  89. int LOCAL DecodeName(PBYTE pb, PSZ pszName, int iLen);
  90. int LOCAL SetDefMissingKW(PCODEOBJ pArg, DWORD dwDefID);
  91. VOID LOCAL SetIntObject(PCODEOBJ pc, DWORD dwData, DWORD dwLen);
  92. VOID LOCAL ComputeChildChkSumLen(PCODEOBJ pcParent, PCODEOBJ pcChild);
  93. VOID LOCAL ComputeArgsChkSumLen(PCODEOBJ pcode);
  94. VOID LOCAL ComputeChkSumLen(PCODEOBJ pcode);
  95. int LOCAL ComputeEISAID(PSZ pszID, PDWORD pdwEISAID);
  96. int LOCAL LookupIDIndex(LONG lID, PDWORD pdwTermIndex);
  97. int LOCAL WriteAMLFile(int fhAML, PCODEOBJ pcode, PDWORD pdwOffset);
  98. VOID LOCAL FreeCodeObjs(PCODEOBJ pcodeRoot);
  99. #ifdef __UNASM
  100. // tables.c
  101. BOOL LOCAL IsWinNT(VOID);
  102. #ifndef WINNT
  103. HANDLE LOCAL OpenVxD(VOID);
  104. VOID LOCAL CloseVxD(HANDLE hVxD);
  105. PBYTE LOCAL VxDGetTableBySig(DWORD dwTabSig, PDWORD pdwTableAddr);
  106. PBYTE LOCAL VxDGetTableByAddr(DWORD dwTableAddr, PDWORD pdwTableSig);
  107. #endif
  108. PBYTE LOCAL GetNTTable(DWORD dwTabSig);
  109. PBYTE LOCAL GetTableBySig(DWORD dwTabSig, PDWORD pdwTableAddr);
  110. PBYTE LOCAL GetTableByAddr(DWORD dwTableAddr, PDWORD pdwTableSig);
  111. int LOCAL DumpAllTables(FILE *pfileOut);
  112. int LOCAL DumpTableBySig(FILE *pfileOut, DWORD dwTableSig);
  113. int LOCAL DumpTableByAddr(FILE *pfileOut, DWORD dwTableAddr);
  114. int LOCAL DumpRSDP(FILE *pfileOut, PBYTE pb, DWORD dwAddr);
  115. int LOCAL DumpTable(FILE *pfileOut, PBYTE pb, DWORD dwTableAddr,
  116. DWORD dwTableSig);
  117. int LOCAL DumpTableTxt(FILE *pfileOut, PBYTE pb, DWORD dwTableAddr,
  118. DWORD dwTableSig);
  119. int LOCAL DumpTableBin(DWORD dwTableSig, DWORD dwAddr, PBYTE pb, DWORD dwLen);
  120. int LOCAL FindTableFmt(DWORD dwTableSig, PFMT *ppfmt, PDWORD pdwFlags);
  121. PSZ LOCAL GetTableSigStr(DWORD dwTableSig);
  122. BOOL LOCAL ValidateTable(PBYTE pbTable, DWORD dwLen);
  123. BOOL LOCAL IsALikelySig(DWORD dwTableSig);
  124. #endif
  125. #endif //ifndef _PROTO_H