
/*
 *  DEFS.H
 */

#include <exec/types.h>
#include <exec/lists.h>
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>

typedef unsigned char	ubyte;
typedef unsigned short	uword;
typedef unsigned long	ulong;
typedef struct MinList	MLIST;
typedef struct MinNode	MNODE;
typedef struct Node	NODE;
typedef struct FileInfoBlock FIB;
typedef struct DateStamp DATESTAMP;
typedef struct Process	PROC;

#define SDIR	struct _SDIR
#define SCOMP	struct _SCOMP

SCOMP {
    MNODE   Node;
    uword   Bytes;	/*  allocated bytes		    */
    uword   N;
};

SDIR {
    MNODE   Node;	/*  node in dir tree		    */
    ubyte   Type;	/*  XDDS or XVOL		    */
    ubyte   HaveFile;	/*  Something was backed up in here */
    char    *Element;	/*  path element		    */
};

#define XVOL	0x01
#define XDDS	0x02
#define XEND	0x03
#define XDAT	0x04
#define XPRO	0x05
#define XCOM	0x06
#define XFIL0	0x87
#define XFIL1	0x88
#define XHDR	0x09
#define XINC	0x0A
#define XCRC	0x0B

#define EMPTYLIST(list) (list.mlh_Head == (MNODE *)&list.mlh_Tail)

extern MLIST	CSList;
extern ubyte	Verbose;
extern long	CLen;
extern SCOMP   *CWrite;
extern MLIST	CList;

extern void *GetHead();


