# include <ohana.h>
# include <dvo.h>
# include <signal.h>
# include <glob.h>

enum {NONE, SIMPLE_CMP, SIMPLE_CMF, SIMPLE_MEF, MOSAIC_CMP, MOSAIC_CMF, MOSAIC_MEF, MOSAIC_PHU};

int       VERBOSE;

char OUTPUT[256];
char GSCFILE[256];
char CATDIR[256];
char CATMODE[16];    /* raw, mef, split, mysql */
char CATFORMAT[16];  /* internal, elixir, loneos, panstarrs */
char SKY_TABLE[256];
int  SKY_DEPTH;
char   ImageCat[256];
Coords *MOSAIC;         // carries the mosaic into ReadImageHeader

typedef struct {
    int     id;
    double  ra;
    double  dec;
    int     Nmatches;
    int     *matches;
    int     arrayLength;
} Point;

int WITH_PHU;
int SOLO_PHU;
int ACCEPT_ASTROM;
char *astromFile;

// These functions belong to dvoImageOverap
int  args_coords    	 PROTO((int argc, char **argv));
int  ConfigInit_coords PROTO((int *argc, char **argv));
int  Shutdown         PROTO((char *format, ...));
void TrapSignal       PROTO((int sig));
void SetProtect       PROTO((int mode));
int  SetSignals       PROTO((void));

Image *ReadImageFiles (char *filename, int *Nimages);
int ReadImageHeader (Header *header, Image *image);
int MatchCoords(Image *, int, Point *, int);

int GetFileMode (Header *header);
