#ifndef REQDIR_H
#define REQDIR_H 1

#ifndef EXEC_TYPES_H
#include <exec/types.h>
#endif

/* stuffing as much as possible into a 4 byte header */

typedef struct
{
UWORD size    :10;        /* size of this directory entry in bytes */
UWORD archive :1;
UWORD read    :1;
UWORD write   :1;
UWORD execute :1;
UWORD delete  :1;
UWORD dir     :1;

UWORD month   :4;         /* month value 1-12 */
UWORD day     :5;         /* day of the month 0-31 */
UWORD year    :6;         /* years since 1978 (no Amigas left in 2041?) */
UWORD spare   :1;

/* char name[];  name of this directory entry */
} Entry;

#define NextEntry(E) ( (Entry *) (((char *)E) + ((Entry *)E)->size) )
#define EntryName(E) ( (char *) (E + 1) )

#endif
