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.

578 lines
21 KiB

  1. /*************************************************************************
  2. * *
  3. * ISEARCH.H *
  4. * *
  5. * Copyright (C) Microsoft Corporation 1990-1992 *
  6. * All Rights reserved. *
  7. * *
  8. **************************************************************************
  9. * *
  10. * Module Intent *
  11. * Common defines internal to the searcher. None of this stuff is *
  12. * available outside the search engine. *
  13. * *
  14. **************************************************************************
  15. * *
  16. * Current Owner: BinhN *
  17. * *
  18. **************************************************************************
  19. * *
  20. * Released by Development: (date) *
  21. * *
  22. *************************************************************************/
  23. // Critical structures that gets messed up in /Zp8
  24. #pragma pack(1)
  25. #define occifNONE 0x0000 // No flags.
  26. #define occifEOF 0x0001 // End of file.
  27. #define occifWRITTEN 0x0002 // This occurrence has been written.
  28. #define occifMATCH 0x0004 // This occurrence is a match.
  29. #define occifHAS_MATCH 0x0008 // Don't do combination this pass.
  30. /**************************************************************************
  31. *
  32. * SYMBOLS STRUCTURE
  33. *
  34. **************************************************************************/
  35. #define cWordsPerToken 5 // a guess at average number of stemmed or wildcard variants
  36. typedef struct WORDINFO
  37. {
  38. struct WORDINFO FAR *pNext;
  39. // Term frequency
  40. DWORD cTopic;
  41. // Word data information
  42. FILEOFFSET foData;
  43. DWORD cbData;
  44. WORD wRealLength; // Real word length
  45. } WORDINFO, FAR *LPWORDINFO;
  46. typedef struct STRING_TOKEN {
  47. struct STRING_TOKEN FAR *pNext;
  48. LPB lpString; // String itself
  49. WORD cUsed; // Times this string appears in the query
  50. WORD wWeight; // Weight of the word
  51. WORD wWeightRemain; // Sum of term weights AFTER this one in the list
  52. LPWORDINFO lpwi; // List of word data for this token
  53. DWORD dwTopicCount;
  54. } STRING_TOKEN;
  55. /* Set the default size of a string block. Assuming that a word length
  56. * is 6, allocate enough memory for 20 words
  57. */
  58. #define STRING_BLOCK_SIZE (sizeof(STRING_TOKEN) + 6) * 20
  59. /* String flags */
  60. #define EXACT_MATCH 0x01
  61. #define WILDCARD_MATCH 0x02
  62. #define TERM_RANGE_MATCH 0x03
  63. /**************************************************************************
  64. *
  65. * QUERY TREE STRUCTURE & FUNCTIONS
  66. *
  67. **************************************************************************/
  68. #define MAX_QUERY_NODE 0xFFFF // Maximum number of tokens in a query
  69. #define TOPICLIST_NODE 0x01 // The node is a topicId node
  70. #define OCCURENCE_NODE 0x02 // The node is an occurrence node
  71. #define NODE_TYPE_MASK 0x0f
  72. #define DONT_FREE 0x10 // Don't free the node after unlink
  73. #define STACK_SIZE 15 // Maximum level of stack
  74. // This is an information buffer structure that you pass to "HitListGetTopic"
  75. // which fills in its fields. You can look at the fields not marked as
  76. // "internal", and also pass it to other API functions.
  77. #define TOPIC_INFO \
  78. WORD wWeight; /* Topicument-weight. */ \
  79. DWORD dwTopicId; /* Topic-ID associated with this hit. */ \
  80. DWORD lcOccur /* Number of occurrences (hits) */
  81. typedef struct SNGLINK
  82. {
  83. struct SNGLINK FAR *pNext;
  84. } SGNLINK, FAR *LPSLINK;
  85. // Internal Occurrence structure
  86. // Be careful when changing the fields of it. See MARKER struct below
  87. typedef struct OCCURENCE
  88. {
  89. struct OCCURENCE FAR *pNext;
  90. WORD fFlag; /* Various flags */
  91. WORD cLength; /* Word length */
  92. DWORD dwCount; /* Word Count, needed for phrase */
  93. DWORD dwOffset; /* Word offset, needed for hilite */
  94. DWORD dwFieldId; /* Field id (_DEBUG only) */
  95. WORD wWeight; /* Hit weight */
  96. LPVOID lpvTerm; /* Pointer to a term in WORD-prefix length
  97. * Unicode format, i.e. a "wide ST".
  98. */
  99. #if defined (_MIPS) || defined (ppc)
  100. WORD wPad;
  101. DWORD dwPad;
  102. #endif
  103. } OCCURENCE, FAR *LPIOCC;
  104. /* Marker node. Be careful when changing the fields of it.
  105. * 1/ The size of it must be <= the size of an OCCURENCE
  106. * 2/ Location of pNext and fFlag must be the same between the two
  107. * structure */
  108. typedef struct MARKER
  109. {
  110. struct OCCURENCE FAR *pNext;
  111. WORD fFlag; /* Various flags */
  112. WORD Unused; /* Unused */
  113. struct MARKER FAR *pPrevMark; /* Previous marker */
  114. struct MARKER FAR *pNextMark; /* Next marker */
  115. } MARKER, FAR *LPMARKER;
  116. /* Occurrence flags */
  117. #define TO_BE_KEPT 0x01
  118. #define TO_BE_SKIPPED 0x02
  119. #define TO_BE_COMPARED 0x04
  120. #define IS_LAST_NODE 0x08
  121. #define IS_MARKER_NODE 0x10
  122. /* Internal Topic List structure */
  123. typedef struct TOPIC_LIST
  124. {
  125. struct TOPIC_LIST FAR * pNext;
  126. LPIOCC lpOccur; // Pointer to occurrence lists
  127. unsigned short fFlag; // Various flags, such as TO_BE_KEPT
  128. TOPIC_INFO;
  129. } TOPIC_LIST;
  130. typedef TOPIC_LIST FAR *LPITOPIC;
  131. /* TopicId node flags */
  132. #define TO_BE_KEPT 0x01
  133. #define HAS_MARKER 0x02
  134. #define IS_MARKER_NODE 0x10
  135. #define WRITTEN_TO_DISK 0x20
  136. #define DL_NEXT(p) (((LPITOPIC)p)->pNext)
  137. #define DL_OCCUR(p) (((LPITOPIC)p)->lpOccur)
  138. /* QueryInfo flags */
  139. #define IN_PHRASE 0x0001
  140. #define FREE_CHARTAB 0x0002
  141. #define FORCED_PHRASE 0x0004
  142. #define CW_PHRASE 0x0010 // Must match COMPOUNDWORD_PHRASE in medv20.h
  143. /* Query info node */
  144. typedef struct QueryInfo
  145. {
  146. LPB lpbQuery; // Query expression bytes.
  147. LPB pWhitespace; // Working variable for implicit phrase
  148. LPQT lpQueryTree; // Query tree.
  149. LPV lpStack; // Pointer to operator's stack
  150. DWORD dwOffset; // Current offset
  151. BREAKER_FUNC lpfnBreakFunc;
  152. LPSIPB lpStopListInfo; // Associated stop list info
  153. LPCHARTAB lpCharTab; // Pointer to character table
  154. LPOPSYM lpOpSymTab; // Operator symbol table
  155. LPERRB lperrb; // Error buffer
  156. DWORD fFlag; // Flag
  157. WORD cOpEntry; // Number of operator entries
  158. WORD Pad;
  159. } QUERY_INFO,
  160. FAR *LPQI;
  161. /* Parameter of an unary operator */
  162. typedef union NodeParm
  163. {
  164. VOID FAR *lpStruct;
  165. DWORD dwValue;
  166. } NODE_PARM;
  167. /* Query Tree nodes */
  168. #define OPERATOR_NODE 1 // Operator
  169. #define TERM_NODE 2 // A string to be searched for
  170. #define NULL_NODE 3 // A string that can't be found
  171. #define EXPRESSION_NODE 4 // The node contains the result
  172. #define STOP_NODE 5 // A stop word
  173. typedef struct QTNODE
  174. {
  175. struct QTNODE FAR *pNext;
  176. struct QTNODE FAR *pPrev;
  177. LPITOPIC lpTopicList; /* Topic linked list */
  178. union
  179. {
  180. STRING_TOKEN FAR *pToken; /* Word associated with this node */
  181. WORD wProxDist; /* Proximity distance */
  182. VOID FAR *lpStruct; /* Structure associated with unary op */
  183. } u;
  184. DWORD cTopic; // Number of TopicId lists of this node
  185. // This number will change when merging
  186. // gets involved
  187. // Max and Min topic id. This is useful for speeding up retrieval
  188. DWORD dwMaxTopicId; // Max topic Id in the list
  189. DWORD dwMinTopicId; // Min topic id in the list
  190. // Word data information
  191. FILEOFFSET foData;
  192. DWORD cbData;
  193. /* Characteristics associated with the node */
  194. LPB lpHiString; /* Hi limit of the string (for THRU) */
  195. LPGROUP lpGroup; /* Group associated with this node */
  196. DWORD dwFieldId; /* FieldID associated with term */
  197. WORD NodeType; /* What type (operator, term, etc) */
  198. WORD OpVal; /* Operator value */
  199. WORD iCurOff; // Offset to the beginning of the word
  200. WORD wRealLength; // Real word length
  201. LPVOID lpvIndexedTerm; /* Pointer to the term in the index that
  202. * currently matches this node. The term's
  203. * string is in WORD-prefix length Unicode
  204. * format, i.e. a "wide ST".
  205. */
  206. // General info
  207. WORD fFlag; /* Various flags */
  208. WORD Offset; /* Offset from the beginning of the query */
  209. WORD wBrkDtype; /* Breaker's dtype (for THRU) */
  210. WORD Pad;
  211. } QTNODE, FAR *_LPQTNODE;
  212. #define QTN_LEFT(p) (((QTNODE FAR *)p)->pPrev)
  213. #define QTN_RIGHT(p) (((QTNODE FAR *)p)->pNext)
  214. #define QTN_PREV(p) (((QTNODE FAR *)p)->pPrev)
  215. #define QTN_NEXT(p) (((QTNODE FAR *)p)->pNext)
  216. #define QTN_NODETYPE(p) (((QTNODE FAR *)p)->NodeType)
  217. #define QTN_OPVAL(p) (((QTNODE FAR *)p)->OpVal)
  218. #define QTN_TOPICLIST(p) (((QTNODE FAR *)p)->lpTopicList)
  219. #define QTN_TOKEN(p) (((QTNODE FAR *)p)->u.pToken)
  220. #define QTN_PARMS(p) (((QTNODE FAR *)p)->u.lpStruct)
  221. #define QTN_FLAG(p) (((QTNODE FAR *)p)->fFlag)
  222. #define QTN_HITERM(p) (((QTNODE FAR *)p)->lpHiString)
  223. #define QTN_OFFSET(p) (((QTNODE FAR *)p)->Offset)
  224. #define QTN_FIELDID(p) (((QTNODE FAR *)p)->dwFieldId)
  225. #define QTN_DTYPE(p) (((QTNODE FAR *)p)->wBrkDtype)
  226. #define QTN_GROUP(p) (((QTNODE FAR *)p)->lpGroup)
  227. /* Block of query's nodes. We allocate 16 nodes per block */
  228. #define QUERY_BLOCK_SIZE sizeof(QTNODE)*16
  229. #define cTOPIC_PER_BLOCK 500
  230. #define cOCC_PER_BLOCK 1000
  231. /* Query tree's flags */
  232. #define TO_BE_SORTED 0x0001
  233. #define HAS_NEAR_RESULT 0x0002
  234. #define ALL_OR 0x0004
  235. #define ALL_AND 0x0008
  236. #define PROCESSED 0x0010
  237. #define ALL_ANDORNOT 0x0020
  238. /* Query tree structure */
  239. typedef struct QTREE
  240. {
  241. CUSTOMSTRUCT cStruct; /* Structure's handle, MUST BE 1ST FIELD!! */
  242. LONG cQuery; /* Note: this can't be unsigned */
  243. DWORD dwcOccFields; /* Occurence fields count */
  244. DWORD dwOccSize; /* Occurence node size */
  245. /* Unary operator related fields */
  246. LPGROUP lpGroup; /* Group associated with all terms */
  247. DWORD dwFieldId; /* Field-ID assigned to all followed terms.*/
  248. WORD wProxDist; /* Proximity distance */
  249. WORD iDefaultOp; /* Default operator. */
  250. WORD wBrkDtype; /* Breaker's dtype (for THRU) */
  251. WORD fFlag; /* Various querytree flags */
  252. /* String table */
  253. LPV lpStringBlock; /* String's memory block */
  254. STRING_TOKEN FAR *lpStrList;/* Pointer to strings table */
  255. LPV lpWordInfoBlock;
  256. /* Topic list related global variables */
  257. LPV lpTopicMemBlock; /* Pointer to Topic memory block */
  258. LPITOPIC lpTopicStartSearch; /* Starting node for searching */
  259. LPSLINK lpTopicFreeList; /* Pointer to free doc list */
  260. DWORD dwTopicNodeCnt;
  261. /* Occ list related global variables */
  262. LPV lpOccMemBlock; /* Pointer to Occ memory block */
  263. LPIOCC lpOccStartSearch; /* Starting occurrence for searching */
  264. LPSLINK lpOccFreeList; /* Pointer to free occurrence list */
  265. DWORD dwOccNodeCnt;
  266. /* Buffer for the tree's nodes */
  267. LPV lpNodeBlock; /* Nodes memory block */
  268. _LPQTNODE lpTopNode; /* Pointer to top node */
  269. /* Index information */
  270. FILEOFFSET foIdxRoot; /* Top node offset */
  271. DWORD dwBlockSize; /* Index block size */
  272. WORD TreeDepth; /* Depth of tree */
  273. WORD cIdxLevels; /* Index's depth */
  274. OCCF occf;
  275. IDXF idxf;
  276. CKEY ckeyTopicId; // 2-bytes
  277. CKEY ckeyOccCount; // 2-bytes
  278. CKEY ckeyWordCount;
  279. CKEY ckeyOffset;
  280. /* MAGIC value... */
  281. LONG magic;
  282. /* Interrupt flag for online use. Online apps don't have callbacks
  283. * so we have to provide an API to set this flag
  284. */
  285. BYTE cInterruptCount; /* Interrupt checking */
  286. BYTE fInterrupt;
  287. /* Similarity stuff */
  288. LPV lpDocScores;
  289. } QTREE,
  290. FAR *_LPQT;
  291. #define HQUERY_MAGIC 0x04121956
  292. // This defines the "type" of word term node.
  293. #define TERM_EXACT 1 // "Standard" term.
  294. #define TERM_PREFIX 2 // "Wildcard" term.
  295. #define TERM_RANGE 3 // Range term. This says "give me everything
  296. // between some low bound and some high
  297. // bound."
  298. /*
  299. * This defines the value or type of operator node. It corresponds to
  300. * the OpVal field of struct OPSYM
  301. */
  302. #define AND_OP 0 // AND operator
  303. #define OR_OP 1 // OR operator
  304. #define NOT_OP 2 // NOT operator
  305. #define PHRASE_OP 3 // PHRASE operator
  306. #define NEAR_OP 4 // NEAR operator
  307. #define MAX_DEFAULT_OP OR_OP // Maximum value of default operator
  308. #define RANGE_OP 5
  309. #define GROUP_OP 6
  310. #define FIELD_OP 7
  311. #define BRKR_OP 8
  312. #define MAX_OPERATOR 8
  313. #define STOP_OP 9 // stop word
  314. #define QUOTE 50
  315. #define RIGHT_PAREN 51
  316. #define LEFT_PAREN 52
  317. #define TERM_TOKEN 53
  318. /* Operator type */
  319. #define BINARY_OP 0x01
  320. #define UNARY_OP 0x02
  321. #define PARSE_TOKEN 0x04
  322. /* Operator attribute */
  323. #define COMMUTATIVE 0x10 // a * b = b * a
  324. #define ASSOCIATIVE 0x20 // a * (b * c) = (a * b) * c
  325. #define ZERO 0x40 // a * a = a
  326. extern WORD OperatorAttributeTable[];
  327. /*
  328. * Those are properties of a binary node expression.
  329. */
  330. #define EXPRESSION_TERM 1 // One branch is an expression, one
  331. // is a term
  332. #define EXPRESSION_EXPRESSION 2 // Both branches are expressions
  333. #if 1
  334. typedef ERR (PASCAL NEAR *FNHANDLER) (LPQT, _LPQTNODE, LPITOPIC, LPV, int);
  335. #else
  336. typedef ERR (PASCAL NEAR *FNHANDLER) (LPQT, LPV, LPV, LPV, int);
  337. #endif
  338. #define ORDERED_BASED 1 // Based on topicId numbered
  339. #define HIT_COUNT_BASED 2 // Based doc's hit count
  340. #define WEIGHT_BASED 3 // based on doc's weight
  341. typedef struct RetVars
  342. {
  343. LPQT lpqt; // Pointer to query tree for global variables
  344. LPBYTE pLeadByteTable; // Pointer to lead byte table for DBCS
  345. DWORD dwTopicCount; // Number of topics
  346. DWORD dwFieldID; // Current fieldid
  347. DWORD cOccFields;
  348. DWORD dwOccSize;
  349. LPB lpbCur;
  350. NODEINFO LeafInfo;
  351. NODEINFO DataInfo;
  352. SRCHINFO SrchInfo; // Search information
  353. LCID lcid; // WIN32 locale ID specified at build time
  354. WORD wWordLength; // Word length
  355. WORD fFlag; // General flags
  356. BYTE pBTreeWord[CB_MAX_WORD_LEN]; // Buffer for the decoded word
  357. BYTE pModifiedWord[CB_MAX_WORD_LEN]; // Buffer for the modified word
  358. BYTE pStemmedBTreeWord[CB_MAX_WORD_LEN]; // Stemmed BTree word
  359. BYTE pStemmedQueryWord[CB_MAX_WORD_LEN]; // Stemmed searched word
  360. BYTE fRank; // If non-zero the result is ranked.
  361. BYTE pNodeBuf[BTREE_NODE_SIZE]; // Generic b-tree node buffer.
  362. BYTE pDataBuf[FILE_BUFFER];
  363. } RETV,
  364. FAR *LPRETV;
  365. /**************************************************************************
  366. *
  367. * OPEN INDEX STRUCTURE
  368. *
  369. **************************************************************************/
  370. typedef struct Idx
  371. {
  372. GHANDLE hStruct; // Handle to this structure.
  373. DWORD dwKey;
  374. FCALLBACK_MSG Callback;
  375. LPBYTE pLeadByteTable; // Pointer to table of DBCS lead bytes
  376. HANDLE hLeadByteTable;
  377. IH20 ih; // Index header.
  378. HFPB hfpbIdxSubFile; // Index file handle. If this is NULL, the
  379. // index isn't open, else it is.
  380. //HFPB hfpbSysFile; // Handle of Index File system
  381. GHANDLE hTopNode; // Handle to "lrgbTopNode".
  382. LRGB lrgbTopNode; // Pointer to the index top node.
  383. FLOAT fSigmaTable; // Sigma table
  384. HANDLE hSigma; // Handle of sigma table
  385. LPERRB lperrb; // Pointer to error block
  386. WORD wSlackSize; // Size of slack in a node
  387. WORD Pad;
  388. } IDX,
  389. FAR *_LPIDX; // The "_" indicates that this is
  390. // a private structure that needs
  391. // to be available publicly. The
  392. // public will call this an "LPIDX".
  393. /*************************************************************************
  394. *
  395. * Hitlist structure
  396. *
  397. *************************************************************************/
  398. typedef struct HitList
  399. {
  400. GHANDLE hStruct; // Structure's handle. MUST BE 1ST FIELD
  401. DWORD lcReturnedTopics; // The number of Topics returned. (what the user wants)
  402. DWORD lcTotalNumOfTopics; // The total number of topics hit by the query.
  403. LPITOPIC lpTopicList; // Starting of TopicList
  404. LPBLK lpOccMemBlock; // Pointer to Occ memory block
  405. LPBLK lpTopicMemBlock; // Pointer to Topic memory block
  406. /* All the following fields are for internal use only */
  407. LPVOID lpHttpQ; // for online search only
  408. DWORD lcMaxTopic; // Max TopicId number (internal)
  409. LPITOPIC lpLastTopic; // Last accessed Topic pointer (internal)
  410. DWORD lLastTopicId; // Last accessed TopicId (internal)
  411. /* Topic list cache */
  412. GHANDLE hTopic; // Handle to Topic file
  413. GHANDLE hTopicCache; // Handle to Topic cache
  414. LPITOPIC lpTopicCache; // Cache for Topic info
  415. DWORD dwTopicCacheStart; // Starting Topic number if the cache
  416. DWORD dwTopicInCacheCount; // Number of topic currently in cache
  417. /* Occurrence cache */
  418. GHANDLE hOcc; // Handle to occurrences file
  419. GHANDLE hOccCache; // Handle to Occ cache
  420. DWORD dwCurTopic; // Current doc that the hit list belongs to
  421. LPIOCC lpOccCache; // Cache for Occ info
  422. DWORD dwOccCacheStart; // Starting Occ number if the cache
  423. /* Various hitlist info for hitlist merge */
  424. struct HitList FAR * lpMainHitList;
  425. struct HitList FAR * lpUpdateHitList;
  426. BYTE lszTopicName[cbMAX_PATH]; // Topic filename
  427. BYTE lszOccName[cbMAX_PATH]; // Occ filename
  428. } HL, FAR *_LPHL;
  429. #define DO_FAST_MERGE(pSrch, lpqt) (((pSrch)->Flag & QUERYRESULT_SKIPOCCINFO) && ((lpqt)->fFlag & ALL_ANDORNOT))
  430. /*************************************************************************
  431. *
  432. * Global Variables
  433. *
  434. * Those variables should be read only
  435. *************************************************************************/
  436. extern FNHANDLER HandlerFuncTable[];
  437. extern OPSYM OperatorSymbolTable[];
  438. extern OPSYM FlatOpSymbolTable[];
  439. extern BYTE LigatureTable[];
  440. /*************************************************************************
  441. *
  442. * Functions Prototypes
  443. *
  444. *************************************************************************/
  445. /* qtparse.c */
  446. PUBLIC LPQT PASCAL NEAR QueryTreeAlloc(void);
  447. PUBLIC ERR PASCAL NEAR QueryTreeAddToken (_LPQT, int, LST, DWORD, BOOL);
  448. PUBLIC LPQT PASCAL NEAR QueryTreeBuild (LPQI);
  449. #if defined(_DEBUG) && DOS_ONLY
  450. PUBLIC ERR PASCAL FAR PrintList(LPQT);
  451. #endif
  452. /* search.c */
  453. PUBLIC ERR PASCAL NEAR ResolveTree(LPIDX, _LPQTNODE, LPRETV, BOOL);
  454. PUBLIC BOOL NEAR PASCAL FGroupLookup(LPGROUP, DWORD);
  455. /* qtlist */
  456. PUBLIC TOPIC_LIST FAR* PASCAL NEAR TopicNodeAllocate(LPQT);
  457. PUBLIC VOID PASCAL NEAR TopicNodeFree (LPQT, _LPQTNODE, LPITOPIC, LPITOPIC);
  458. PUBLIC ERR PASCAL NEAR TopicNodeInsert (LPQT, _LPQTNODE, LPITOPIC);
  459. PUBLIC LPITOPIC PASCAL NEAR TopicNodeSearch(LPQT, _LPQTNODE, DWORD);
  460. PUBLIC LPIOCC PASCAL NEAR OccNodeAllocate(LPQT);
  461. PUBLIC LPIOCC PASCAL NEAR OccNodeSearch(LPQT, LPITOPIC , LPIOCC );
  462. PUBLIC ERR PASCAL NEAR OccNodeInsert(LPQT, LPITOPIC, LPIOCC);
  463. PUBLIC int PASCAL NEAR OccCompare(LPIOCC, LPIOCC);
  464. PUBLIC VOID PASCAL NEAR RemoveNode(LPQT, LPV, LPSLINK, LPSLINK, int);
  465. PUBLIC VOID PASCAL NEAR FreeTree (_LPQTNODE);
  466. /* combine.c */
  467. PUBLIC VOID PASCAL NEAR RemoveUnmarkedTopicList (LPQT, _LPQTNODE, BOOL);
  468. PUBLIC VOID PASCAL NEAR RemoveUnmarkedNearTopicList (_LPQT, _LPQTNODE);
  469. PUBLIC VOID PASCAL NEAR MarkTopicList (_LPQTNODE);
  470. PUBLIC VOID PASCAL NEAR MergeOccurence(LPQT, LPITOPIC , LPITOPIC);
  471. PUBLIC VOID PASCAL NEAR SortResult (LPQT, _LPQTNODE, WORD);
  472. PUBLIC ERR PASCAL NEAR OrHandler(LPQT, _LPQTNODE, LPITOPIC, LPV, int);
  473. PUBLIC ERR PASCAL NEAR AndHandler(LPQT, _LPQTNODE, LPITOPIC, LPV, int);
  474. PUBLIC ERR PASCAL NEAR NotHandler(LPQT, _LPQTNODE, LPITOPIC, LPV, int);
  475. PUBLIC ERR PASCAL NEAR NearHandler(LPQT, _LPQTNODE, LPITOPIC, LPV, int);
  476. PUBLIC ERR PASCAL NEAR PhraseHandler(LPQT, _LPQTNODE, LPITOPIC, LPV, int);
  477. PUBLIC VOID PASCAL NEAR NearHandlerCleanUp (LPQT, _LPQTNODE);
  478. PUBLIC ERR PASCAL NEAR TopicListSort (_LPQTNODE lpQtNode, BOOL fFlag);
  479. // Critical structures that gets messed up in /Zp8
  480. #pragma pack()