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.

186 lines
5.3 KiB

  1. /*++
  2. Copyright (c) 1990 Microsoft Corporation
  3. Module Name:
  4. mbr.h
  5. Abstract:
  6. Common include file for the MS Editor browser extension.
  7. Author:
  8. Ramon Juan San Andres (ramonsa) 06-Nov-1990
  9. Revision History:
  10. --*/
  11. #ifndef EXTINT
  12. #include "ext.h" /* mep extension include file */
  13. #include <string.h>
  14. #if defined (OS2)
  15. #define INCL_DOSPROCESS
  16. #define INCL_DOSMODULEMGR
  17. #define INCL_DOSFILEMGR
  18. #define INCL_DOSMISC
  19. #include <os2.h> /* os2 system calls */
  20. #else
  21. #include <windows.h>
  22. #endif
  23. #endif
  24. #include <hungary.h>
  25. #include <bsc.h>
  26. #include <bscsup.h>
  27. #include <stdlib.h>
  28. #include <stdio.h>
  29. #include <tools.h>
  30. // rjsa 10/22/90
  31. // Some runtime library functions are broken, so intrinsics have
  32. // to be used.
  33. //
  34. #pragma intrinsic (memset, memcpy, memcmp)
  35. //#pragma intrinsic (strset, strcpy, strcmp, strcat, strlen)
  36. // typedef char buffer[BUFLEN];
  37. typedef int DEFREF;
  38. #define Q_DEFINITION 1
  39. #define Q_REFERENCE 2
  40. #define CMND_NONE 0
  41. #define CMND_LISTREF 1
  42. #define CMND_OUTLINE 2
  43. #define CMND_CALLTREE 3
  44. #define CALLTREE_FORWARD 0
  45. #define CALLTREE_BACKWARD 1
  46. /////////////////////////////////////////////////////////////////////////
  47. //
  48. // Global Data
  49. //
  50. // Bsc info.
  51. //
  52. flagType BscInUse; /* BSC database selected flag */
  53. buffer BscName; /* BSC database name */
  54. MBF BscMbf; /* Last BSC MBF switch */
  55. int BscCalltreeDir; /* Calltree direction switch */
  56. int BscCmnd; /* Last command performed */
  57. buffer BscArg; /* Last argument used */
  58. // Windows
  59. //
  60. PFILE pBrowse; /* Browse PFILE */
  61. LINE BrowseLine; /* Current line within file */
  62. // results of procArgs.
  63. //
  64. int cArg; /* number of <args> hit */
  65. rn rnArg; /* range of argument */
  66. char *pArgText; /* ptr to any single line text */
  67. char *pArgWord; /* ptr to context-sens word */
  68. PFILE pFileCur; /* file handle of user file */
  69. // colors
  70. //
  71. int hlColor; /* normal: white on black */
  72. int blColor; /* bold: high white on black */
  73. int itColor; /* italics: high green on black */
  74. int ulColor; /* underline: high red on black */
  75. int wrColor; /* warning: black on white */
  76. // misc.
  77. //
  78. buffer buf; /* utility buffer */
  79. /////////////////////////////////////////////////////////////////////////
  80. //
  81. // Prototypes of global functions
  82. //
  83. // mbrdlg.c
  84. //
  85. flagType pascal EXTERNAL mBRdoSetBsc (USHORT argData, ARG far *pArg, flagType fMeta);
  86. flagType pascal EXTERNAL mBRdoNext (USHORT argData, ARG far *pArg, flagType fMeta);
  87. flagType pascal EXTERNAL mBRdoPrev (USHORT argData, ARG far *pArg, flagType fMeta);
  88. flagType pascal EXTERNAL mBRdoDef (USHORT argData, ARG far *pArg, flagType fMeta);
  89. flagType pascal EXTERNAL mBRdoRef (USHORT argData, ARG far *pArg, flagType fMeta);
  90. flagType pascal EXTERNAL mBRdoLstRef (USHORT argData, ARG far *pArg, flagType fMeta);
  91. flagType pascal EXTERNAL mBRdoOutlin (USHORT argData, ARG far *pArg, flagType fMeta);
  92. flagType pascal EXTERNAL mBRdoCalTre (USHORT argData, ARG far *pArg, flagType fMeta);
  93. // mbrevt.c
  94. //
  95. void pascal mbrevtinit (void);
  96. // mbrutil.c
  97. //
  98. int pascal procArgs (ARG far * pArg);
  99. void pascal GrabWord (void);
  100. flagType pascal wordSepar (CHAR c);
  101. flagType pascal errstat (char *sz1,char *sz2 );
  102. void pascal stat (char * pszFcn);
  103. int far pascal SetMatchCriteria (char far *pTxt );
  104. int far pascal SetCalltreeDirection (char far *pTxt );
  105. MBF pascal GetMbf (PBYTE pTxt);
  106. // mbrfile.c
  107. //
  108. flagType pascal OpenDataBase (char * Path);
  109. void pascal CloseDataBase (void);
  110. // mbrwin.c
  111. //
  112. void pascal OpenBrowse (void );
  113. // mbrqry.c
  114. //
  115. void pascal InitDefRef(DEFREF QueryType, char *Symbol );
  116. void GotoDefRef(void );
  117. void pascal MoveToSymbol(LINE Line, char *Buf, char *Symbol);
  118. void NextDefRef(void );
  119. void PrevDefRef(void );
  120. BOOL InstanceTypeMatches(IINST Iinst);
  121. /////////////////////////////////////////////////////////////////////////
  122. //
  123. // Messages
  124. //
  125. #define MBRERR_CANNOT_OPEN_BSC "Cannot open bsc database"
  126. #define MBRERR_BAD_BSC_VERSION "Bad version database"
  127. #define MBRERR_BSC_SEEK_ERROR "BSC Library: Error seeking in file"
  128. #define MBRERR_BSC_READ_ERROR "BSC Library: Error reading in file"
  129. #define MBRERR_NOSUCHFILE "Cannot find file"
  130. #define MBRERR_LAST_DEF "That is the last definition"
  131. #define MBRERR_LAST_REF "That is the last reference"
  132. #define MBRERR_FIRST_DEF "No previous definition"
  133. #define MBRERR_FIRST_REF "No previous reference"
  134. #define MBRERR_NOT_MODULE "Not a module name:"
  135. // #define MBRERR_CTDIR_INV "Valid switch values are: F(orward) B(ackward)"
  136. // #define MBRERR_MATCH_INV "Valid switch values are combinations of: T F M V"