// EDI.H
// Written by Stefan Pfeiffer, DL1ELY, 960418
// Last Modification: 960418
// (C) 1996 by Stefan Pfeiffer

#ifndef EDI_H

#define EDI_H


#define NORMLEN  80
#define SHORTLEN 40
#define CALL_LEN 14
#define LOC_LEN   7

typedef uchar unsigned char;
typedef uint unsigned int;
typedef ulong unsigned long;

typedef struct EDI_Header
{
   uchar Version;
   uchar TName[NORMLEN];
   uchar TType[SHORTLEN];
   uchar TCode;
   uchar TDate_Begin[9];
   uchar TDate_End[9];
   uchar PCall[CALL_LEN];
   uchar PWWLo[LOC_LEN];
   uchar PExch[7];
   uchar PAdr1[NORMLEN];
   uchar PAdr2[NORMLEN];
   uchar PSect[SHORTLEN];
   uchar PBand[8];
   uchar PClub[CALL_LEN];
   uchar RName[SHORTLEN];
   uchar RCall[CALL_LEN];
   uchar RAdr1[NORMLEN];
   uchar RAdr2[NORMLEN];
   uchar RPoCo[SHORTLEN];
   uchar RCity[SHORTLEN];
   uchar RCoun[SHORTLEN];
   uchar RPhon[SHORTLEN];
   uchar RHBBS[SHORTLEN];
   uchar MOpe1[NORMLEN];
   uchar MOpe2[NORMLEN];
   uchar STXEq[NORMLEN];
   uchar SPowe[SHORTLEN];
   uchar SRXEq[NORMLEN];
   uchar SAnte[SHORTLEN];
   uint SAntH_AG, SAntH_ASL;
   uint CQSOs, CQSOs_Multi;
   uint CQSOs_All;
   ulong CQSOP;
   uint CWWLs, CWWLs_Bonus, CWWLs_Multi;
   ulong CWWLB;
   uint CExcs, CExcs_Bonus, CExcs_Multi;
   ulong CExcB;
   uint CDXCs, CDXCs_Bonus, CDXCs_Multi;
   ulong CDXCB;
   ulong CToSc;
   uchar CODXC[CALL_LEN];
   uchar CODXC_WWL[LOC_LEN];
   uint CODXC_Dist;
};


typedef struct EDI_Rec
{
   struct EDI_Rec *prev;
   struct EDI_Rec *next;

   uchar Date[7];
   uchar Time[5];
   uchar Call[CALL_LEN];
   uchar Mode;
   uchar Sent_RST[4];
   uchar Sent_Number[5];
   uchar Received_RST[4];
   uchar Received_Number[5];
   uchar Received_Exchange[7];
   uchar Received_WWL[LOC_LEN];
   uint QSO_Points;
   uchar New_Exchange;
   uchar New_WWL;
   uchar New_DXCC;
   uchar Dup_QSO;
};

#endif


