#ifndef __INC_POS_PDOS_SCANDIR_H
#define __INC_POS_PDOS_SCANDIR_H
/*******************************************************************
 Includes Release 24
 (C) Copyright 1995-1997 proDAD
     All Rights Reserved

 $AUT Holger Burkarth
 $DAT >>ScanDir.h<<   02 Dec 1996    13:07:39 - (C) ProDAD
*******************************************************************/
#ifndef __INC_POS_PDOS_PATTERN_H
#include <pDOS/Pattern.h>
#endif
#ifndef __INC_POS_PDOS_FIB_H
#include <pDOS/FIB.h>
#endif


/*----------------------------------
-----------------------------------*/
struct pOS_AnchorPath
{
  struct pOS_PatternMatching ap_Pattern;

  struct pOS_List            ap_List;        /* list of pOS_AnchorPathObj */
  struct pOS_AnchorPathObj  *ap_RetObj;      /* Object is set, when APF_ReturnDir is set */

  ULONG                      ap_BreakBits;   /* Bits we want to break on */
  ULONG                      ap_FoundBreak;  /* Bits we broke on. Also returns ERROR_BREAK */
  UWORD                      ap_Flags;       /* (enum pOS_AnchorPathFlags) */
  const dosname_t           *ap_Path;        /* (intern) Path-Part by Init */
  const dosname_t           *ap_File;        /* (intern) File/Pattern-Part by Init */
  struct pOS_DosDevPathInfo *ap_PI;          /* (intern) */
  UBYTE                      ap_Reserved[28];
  UWORD                      ap_BufLen;      /* null => unused */
  UBYTE                      ap_Buf[1];
};


struct pOS_AnchorPathObj* pOS_CURRANCHORPATH(const struct pOS_AnchorPath*);
#define pOS_CURRANCHORPATH(ap) ( (struct pOS_AnchorPathObj*)(ap)->ap_List.lh_TailPred )



/*----------------------------------
-----------------------------------*/
struct pOS_AnchorPathObj
{
  struct pOS_Node           an_Node;
  struct pOS_FileLock      *an_Lock;
  struct pOS_FileInfoBlock  an_FIB;

/** SYSTEM-PRIVATE **/


};


enum pOS_AnchorPathFlags
{
  APF_OnlyWild=    0x0001,      /* Bit SET for pattern matching */
  APF_IsWild=      0x0002,      /* Das aktuelle Objekt (pOS_CURRANCHORPATH)
                                ** wurde vom Patternmatching erkannt.
                                */

  APF_DoEnterDir=  0x0004,      /* Das aktuelle Objekt ist ein DIR und beim
                                ** nächsten Aufruf von pOS_PathMatchNext() entscheidet
                                ** diese Bit, ob in das DIR verzweigt wird.
                                */

  APF_ReturnDir=   0x0008,      /* Der letzte Dir-Eintrag ist erreicht, der nächte
                                ** Aufruf von pOS_PathMatchNext() ist im Parent-Dir.
                                */

  APF_StdPattern=  0x0100,      /* autom. created #? as pattern */
  APF_PrtError=    0x0200,      /* print error to pr_CES */
  APF_MultiAssign= 0x0400,      /* enable multi-assign scanning */

  APF_NTMode=      0x8000       /* wird in MatchFirst gesetzt, falls ein ExNext möglich ist */
};



#endif
