/*
 *  Xmodem , FTS-1, FTS-7 stuff
 */

#ifndef _XMODEM_H_

#include <exec/types.h>
#include <exec/nodes.h>
#include <libraries/dosextens.h>

#define MAXXWINDOW 6

typedef struct block block;
struct block {
  struct Node bl_node;
  BYTE bl_padding;     /* kludge to fix the padding from aligning */
  char bl_start;       /* generally SOH or SYN */
  BYTE bl_blocknum;
  BYTE bl_blockcom;
  unsigned char bl_contents[128];
  union check {
    BYTE cksum;
    unsigned short crc;
  } bl_check;
#define checksum bl_check.cksum
};

struct WindowX {
   struct List wx_blocks;
   struct List wx_freeblocks;   
   int nextblock;         /* Next block to save to disk - 
                            (rcvd-nextblock)<MAXWINDOW  */
   void *blockBuffer;      /* pointer kept in order to free memory */
};

#define _XMODEM_H_
#endif /* _XMODEM_H_ */
