/*
** demlib.h -- header file for demlib.c
**
** By Brian "Beej" Hall
**    beej@ecst.csuchico.edu
**
** This code is in the public domain.
*/

#ifndef _DEMLIB_H_
#define _DEMLIB_H_

struct a_header {
	char qname[145];
	int lcode;
	int pcode;
	int rsyscode;
	int zcode;
	float projparam[15];
	int punits;
	int eunits;
	int psides;
	float gcoords[4][2];
	float minelev;
	float maxelev;
	float angle;
	int crecpresent;
	float sres[3];
	int rows;
	int cols;
};

struct b_header {
	int row;  /* references row and column numbers in arec */
	int col;
	int rows;
	int cols;
	float gcoord[2];
	float elev;
	float maxelev;
	float minelev;
};

void read_a_header(FILE *fp, struct a_header *a);
void read_b_header(FILE *fp, struct b_header *b);
void seek_a_header(FILE *fp);
void seek_b_header(FILE *fp, int num);

#endif

