//  definition of the MacTrimpi header structure
//
struct MacTrimpi  {
	char magicstring[8];		//  ID, should be DATA\0\0\0\0
	char totalhdrs[3];			//  total number of 512 byte headers,
								//	including this one.  Null term ASCII
	char abbrev[8];				//  7 char abbreviation for title, if any
	char stationcode[3];		//  2 char station code
	char title[82];				//  Title/where recording was made
	char month[3];				//  Numeric with zero placeholder;
								//  March = 3, Oct = 10
	char day[3];				//  Numeric with zero placeholder
	char year[5];				//  Full year
	char hours[3];				//  Numeric with zero placeholder
	char minutes[3];
	char seconds[3];
	char msec[4];
	char sampling_period[15];	//  floating point number in seconds
	char samplebits[3];			//  bits per sample
	char wordsize[2];			//  bytes per sample
	char typemark;				//  see data type defines
	char swapping;				//  see swapping defines
	char signing;				//  see signing defines
	char caltype;
	char calmin[15];
	char calmax[15];
	char calunits[40];
	char recordsize[6];			//  bytes to get in a single read
	char sourcevers[9];			//  version of source code
	char fill[512-237];
};


									
#define		AMPLITUDE		'A'
#define		UNSWAPPED		'U'
#define		SIGNED			'S'
#define		CALIBRATED		'C'

int MacTrimpi_print_file (int fd);
int MacTrimpi_print_header (struct MacTrimpi* header);

	