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.

106 lines
2.9 KiB

  1. // bscsup.h
  2. //
  3. // BSC high level support functions
  4. //
  5. VOID BSC_API StatsBSC(VOID); // ascii dump of bsc statistics
  6. VOID BSC_API DumpBSC(VOID); // ascii dump of the .bsc file
  7. VOID BSC_API DumpInst(IINST iinst); // ascii dump of single inst (name + flags)
  8. LSZ BSC_API LszTypInst(IINST iinst); // ascii version of iinst type
  9. VOID BSC_API CallTreeInst (IINST iinst); // call tree from given inst
  10. BOOL BSC_API FCallTreeLsz(LSZ lszName); // call tree from given name
  11. VOID BSC_API RevTreeInst (IINST iinst); // reverse call tree from given inst
  12. BOOL BSC_API FRevTreeLsz(LSZ lszName); // reverse call tree from given name
  13. // Browse OBject
  14. typedef DWORD BOB;
  15. #define bobNil 0L
  16. typedef WORD CLS;
  17. #define clsMod 1
  18. #define clsInst 2
  19. #define clsRef 3
  20. #define clsDef 4
  21. #define clsUse 5
  22. #define clsUby 6
  23. #define clsSym 7
  24. #define BobFrClsIdx(cls, idx) ((((long)(cls)) << 24) | (idx))
  25. #define ClsOfBob(bob) (CLS)((bob) >> 24)
  26. #define ImodFrBob(bob) ((IMOD)(bob))
  27. #define IinstFrBob(bob) ((IINST)(bob))
  28. #define IrefFrBob(bob) ((IREF)((bob) & 0xffffffL))
  29. #define IdefFrBob(bob) ((IDEF)(bob))
  30. #define IuseFrBob(bob) ((IUSE)(bob))
  31. #define IubyFrBob(bob) ((IUBY)(bob))
  32. #define IsymFrBob(bob) ((ISYM)(bob))
  33. #define BobFrMod(x) (BobFrClsIdx(clsMod, (x)))
  34. #define BobFrSym(x) (BobFrClsIdx(clsSym, (x)))
  35. #define BobFrInst(x) (BobFrClsIdx(clsInst, (x)))
  36. #define BobFrRef(x) (BobFrClsIdx(clsDef, (x)))
  37. #define BobFrDef(x) (BobFrClsIdx(clsRef, (x)))
  38. #define BobFrUse(x) (BobFrClsIdx(clsUse, (x)))
  39. #define BobFrUby(x) (BobFrClsIdx(clsUby, (x)))
  40. // these are the query types
  41. //
  42. typedef enum _qy_ {
  43. qyFiles, qySymbols, qyContains,
  44. qyCalls, qyCalledBy, qyUses, qyUsedBy,
  45. qyUsedIn, qyDefinedIn,
  46. qyDefs, qyRefs
  47. } QY;
  48. // these are visible so that you can see how the query is progressing
  49. // you may not write on these -- these values may or may not have anything
  50. // to do with any database indices
  51. //
  52. extern IDX far idxQyStart;
  53. extern IDX far idxQyCur;
  54. extern IDX far idxQyMac;
  55. BOOL BSC_API InitBSCQuery (QY qy, BOB bob);
  56. BOB BSC_API BobNext(VOID);
  57. LSZ BSC_API LszNameFrBob(BOB bob);
  58. BOB BSC_API BobFrName(LSZ lsz);
  59. // these are the instance types you can filter on
  60. // they are called MBF's for historical reasons which are not clear to me
  61. //
  62. typedef WORD MBF;
  63. // these may be or'd together
  64. #define mbfNil 0
  65. #define mbfVars 1
  66. #define mbfFuncs 2
  67. #define mbfMacros 4
  68. #define mbfTypes 8
  69. #define mbfAll 15
  70. BOOL BSC_API FInstFilter (IINST iinst, MBF mbf);
  71. // show outline for the given files (by imod, or by Pattern)
  72. //
  73. VOID BSC_API OutlineMod(IMOD imod, MBF mbfReqd);
  74. BOOL BSC_API FOutlineModuleLsz (LSZ lszPattern, MBF mbfReqd);
  75. LSZ BSC_API LszBaseName(LSZ lsz);
  76. // list references for all symbols meeting the mbf requirement
  77. //
  78. BOOL BSC_API ListRefs (MBF mbfReqd);
  79. // DOS style wildcard matching
  80. //
  81. BOOL BSC_API FWildMatch(LSZ lszPat, LSZ lszText);