/* adosfs_udir.h 930819 Niklas Hallqvist <niklas@appli.se> */

/* Adapted from Frank J. Edwards' Amix AmigaDOS FS implementation.  */

#ifndef _ADOSFS_ADOSFS_UDIR_H
#define _ADOSFS_ADOSFS_UDIR_H

/***
Copyright (c) 1991, 1992 by Frank J. Edwards
See the file COPYRIGHT in this distribution for copyright details.
***/

/***********************************************************************
-  Software for the AmigaDOS filesystem implementation for use         -
-  on Amiga Unix 2.0 and later.                                        -
-                                                                      -
-  Copyright (c) 1991 by Frank J. Edwards                              -
-  All rights reserved.                                                -
***********************************************************************/

/*
 *	Many of the structures and define's in this file are derived from
 *	documentation located either in the AmigaDOS Manual, 3rd Edition,
 *	or from include file(s)/comments in /usr/amiga/src directory tree.
 */

struct a_udir {
  ados_u_long	ud_type;	/* T.SHORT (2) */
  ados_u_long	ud_hkey;	/* header key (pointer to self) */
  ados_u_long	ud_rsvp1[3];	/* always 0 */
  ados_u_long	ud_chksm;	/* balance-to-zero checksum */
  ados_u_long	ud_hash[NUMHASH];
  ados_u_long	ud_rsvp2[2];	/* always 0 */
  ados_u_long	ud_prot;	/* Protection bits for this directory */
  ados_u_long	ud_rsvp3[1];	/* always 0 */
  ados_u_long	ud_comment[23];	/* Contains character data */
  DateStamp	ud_dirstmp;	/* datestamp of last DIR-modified time */
  ados_u_char	ud_name[36];	/* directory name */
  ados_u_long	ud_rsvp4[7];	/* always 0 */
  ados_u_long	ud_hashchn;	/* pointer to next file in hash chain */
  ados_u_long	ud_parent;	/* pointer to parent of this entry */
  ados_u_long	ud_dircache;	/* Non-zero block number for DOS3 */
  ados_long	ud_type2;	/* ST_USERDIR (2) */
};

#define AUDIR(x)	((struct a_udir *)(x))

#endif /* _ADOSFS_ADOSFS_UDIR_H */
