/*static char *SCCSID = "@(#)ltypes.h	6.1 90/11/18";*/
/*static char *SCCSID = "@(#)ltypes.h	13.4 90/01/30";*/

#include "buf.h"
#include <types.h>
#include "oldfnode.h"

typedef struct mem_blk { /* general structure to keep a tree node in */
  struct mem_blk *next;  /* next disk fragment in linked list */
  ULONG psn;             /* where we found the block on the disk */
  USHORT children;       /* number of children this block needs */
  USHORT parent;         /* non-zero if this block needs a parent */
  union blk blk;         /* the actual structure from the disk */
  struct mem_blk *childlist;	/* linked list of child structures */
}mem_blk;

#define EAAT  SPTR
#define PEAAT PSPTR


/* BUGBUG - temporary, move to types file for utilities some time */

#define BYTES_PER_DIRBLK (SECTORS_PER_DIRBLK * SECSIZE)

typedef union {
	PUCHAR  p;
        PDIRENT d;
} uDIRENT, *PuDIRENT;

typedef union {
	PUCHAR  p;
        PDIRBLK d;
} uDIRBLK, *PuDIRBLK;

/*
 * Codepage checking/recovery memory list structure.
 * The information about a given codepage sector is stored in this
 * structure.
 */

typedef struct _cpinfolist {
	USHORT index;
	ULONG lsn;
	USHORT dirty;
	USHORT cp_type;

	union {
		PUCHAR p;
 PCPINFOSECTOR cp;
 PCPDATASECTOR cps;
	} p;

	struct _cpinfolist *next;

  } CPINFOLIST, *PCPINFOLIST;
