/*static char *SCCSID = "@(#)pr_dir.h   6.2 92/01/31";*/
#include "PR_DIR.NAM"
/* Prototypes for all DIR\ functions */

        extern PDIRLOOK ADL (PCRACKEDPATH pcpPath,
                        PSUBDIR psbdDirToAdd,
                        PFRAME  pfrm);

        extern USHORT far CorruptDir (PFRAME pfrm);

        extern BOOL FindDir (PCRACKEDPATH pcpDirToFind,
                        PDIRBLK far *ppdbFound,
                        PBUFNODE far *ppbufFound,
                        PSUBDIR far *ppsbdFound,
                        PFRAME  pfrm);

        extern PDIRENT FindIP (LSN lsnDnPtr,
                        PDIRBLK  pdbToSearch);

        extern USHORT LookFile(PCRACKEDPATH pcp,
                                PDIRBLK far * ppdbRes,
                                PDIRENT far * ppdeRes,
                                PBUFNODE far * ppbufRes,
                                PFRAME  pfrm);

        extern PDIRENT far MkRoom (USHORT cusHowMuch,
                        PDIRENT pdeInsertPt,
                        PDIRBLK  pdbToAdd);

        extern PDIRENT RDE (POFT poftToSearch,
                        PBUFNODE  far *ppbufDirCacheBlk,
                        PFRAME  pfrm);

        extern PSUBDIR SDL (PCRACKEDPATH pcpPath, PFRAME pfrm);

// 75229 change to far
        extern PDIRBLK far SplitDir (PDIRBLK pdbToSplit,
                        PBUFNODE pbufDirBlk,
                        PDIRENT pdePromotionBuffer,
                        BOOL fWrtThru,
                        PFRAME  pfrm);

        extern void LDEInit (void);

        extern USHORT LDE  (PDIRBLK   pdbTop,
                        BYTE bAction,
                        BOOL fWrtThru,
                        PBUFNODE  pbufTopDir,
                        PPASCALSTRING pspName,
                        PBUFNODE  far *ppbufResult,
                        PDIRBLK   far *ppdbResult,
                        PDIRENT far *ppdeResult,
                        BOOL fCmpType,          //#90495
                        PFRAME  pfrm);

        extern USHORT LDECreate(PDIRENT pdeBeyond,
                        PPASCALSTRING pspName,
                        struct LDEstack far *pldestk,
                        PBUFNODE  far *ppbufResult,
                        PDIRBLK   far *ppdbResult,
                        PDIRENT far *ppdeResult,
                        PFRAME  pfrm);

// 75229 change to far
        extern USHORT far LDEAddLevel(PDIRBLK   pdbUpperHalf,
                        PDIRBLK   pdbLowerHalf,
                        PDIRENT pdeToPromote,
                        BOOL    fWrtThru,
                        PBUFNODE  far *ppbufResult,
                        PDIRBLK   far *ppdbResult,
                        PFRAME  pfrm);

        extern USHORT far insert (PDIRBLK   blkptr,
                        PBUFNODE blkbufp,
                        PDIRENT  newrec,
                        LSN      newdp,
                        PFRAME   pfrm);

        extern void far FixUp(PDIRENT dirptr,
                        LSN      newsec,
                        SHORT    Cnt,
                        PFRAME   pfrm);

        #define UnHoldDir()     UnHoldDir_( pfrm->psbd )

        extern void UnHoldDir_ (PSUBDIR psbd);

        extern void ChkHoldDir (PSUBDIR psbd);

#define UnLockDir()     UnLockDir_( pfrm->psbd )

        extern void UnLockDir_ (PSUBDIR psbd);

        extern void LockDir (PSUBDIR psbdir, PFRAME pfrm);

        extern void HoldDir (PSUBDIR psbd, PFRAME pfrm);

//#86557 change to far
        extern USHORT far Adjust (LSN sector, PFRAME pfrm);
#include "PR_DIR.SEG"
