/* XDS v2.51: Copyright (c) 1999-2003 Excelsior, LLC. All Rights Reserved. */
/* Generated by XDS Modula-2 to ANSI C v4.20 translator */

#ifndef xDevData_H_
#define xDevData_H_
#ifndef X2C_H_
#include "X2C.h"
#endif
#ifndef xlibOS_H_
#include "xlibOS.h"
#endif
#ifndef xrInt64_H_
#include "xrInt64.h"
#endif
#ifndef ChanConsts_H_
#include "ChanConsts.h"
#endif
#ifndef IOLink_H_
#include "IOLink.h"
#endif

typedef IOLink_DeviceTablePtr xDevData_Object;

typedef X2C_CARD8 xDevData_FlagSet;

typedef enum ChanConsts_OpenResults xDevData_OpenResults;

#define xDevData_BUFSIZE 256

enum xDevData_BufMode {xDevData_bmDefault, 
   xDevData_bmFull, 
   xDevData_bmLine, 
   xDevData_bmNone};



struct xDevData__D0 {
   X2C_CHAR * Adr;
   X2C_INDEX Len0;
};

typedef struct xDevData__D0 * xDevData_FileName;

typedef X2C_LOC * xDevData_Buffer;

struct xDevData_DevDataRec;

typedef struct xDevData_DevDataRec * xDevData_DevData;

typedef X2C_INT32 ( *xDevData_IO_OP)(xDevData_DevData, X2C_ADDRESS,
                X2C_CARD32, X2C_CARD32 *);

typedef void ( *xDevData_UNGETC_OP)(xDevData_DevData, X2C_CHAR);

typedef X2C_INT32 ( *xDevData_FLUSH_OP)(xDevData_DevData);


struct xDevData_DevDataRec {
   X2C_OSFHANDLE cf;
   xDevData_DevData fwd;
   xDevData_DevData bck;
   xDevData_FileName name;
   X2C_CARD8 flags;
   X2C_CARD32 tags;
   xDevData_IO_OP bread;
   xDevData_IO_OP bwrite;
   xDevData_IO_OP read0;
   xDevData_IO_OP write0;
   xDevData_UNGETC_OP ungetc0;
   xDevData_FLUSH_OP flush;
   xDevData_Buffer buf;
   X2C_CARD32 bpos;
   X2C_CARD32 blen;
   struct X2C_int64 spos;
   X2C_CHAR ubuf[8];
   X2C_CARD32 ucnt;
};

extern void xDevData_MakeName(xDevData_FileName *, X2C_CHAR [], X2C_CARD32,
                X2C_CARD8 *);

extern void xDevData_UnMakeName(xDevData_FileName *);

extern void xDevData_Open(IOLink_DeviceTablePtr, X2C_OSFHANDLE,
                xDevData_FileName, X2C_CARD8, X2C_CARD8, X2C_CARD8 *);

extern void xDevData_ForbidAll(IOLink_DeviceTablePtr);

extern void xDevData_SetMode(IOLink_DeviceTablePtr, X2C_BOOLEAN);

extern xDevData_DevData xDevData_GetDevData(IOLink_DeviceTablePtr);

extern void xDevData_GetDID(IOLink_DeviceId *);

extern void xDevData_Close(IOLink_DeviceTablePtr);

extern void xDevData_HardError(IOLink_DeviceTablePtr, X2C_WORD);

extern void xDevData_SoftError(IOLink_DeviceTablePtr, X2C_WORD);

extern void xDevData_CurrentPos(IOLink_DeviceTablePtr, struct X2C_int64 *);

extern void xDevData_Length(IOLink_DeviceTablePtr, struct X2C_int64 *);

extern void xDevData_SetPos(IOLink_DeviceTablePtr, struct X2C_int64);


extern void xDevData_BEGIN(void);


#endif /* xDevData_H_ */
