# include "gastro.h"

main (argc, argv)
int argc;
char **argv;
{

  int i, N1, N2, Ncat, Nregions, NX, NY, Nmatch, status;
  char **regions, **gregions();
  Stars *catalog, *stars1, *stars2, *gstars();
  struct timeval now, then;  
  Coords coords, dcoords;
  double dNdM, dR, TotalArea;
  float val;

  ConfigInit ();
  if (argc < 4) {
    fprintf (stderr, "USAGE gscdump RA DEC Radius\n");
    exit (0);
  }

  coords.crval1 = atof (argv[1]);
  coords.crval2 = atof (argv[2]);
  NX = NY = 0;

  regions = gregions (&coords, &Nregions, &TotalArea);

  for (Ncat = i = 0; i < Nregions; i++) {
    status = gcatalog (regions[i], &catalog, &Ncat, 0, 0);
  }

  for (i = 0; i < Ncat; i++) {
    fprintf (stdout, "%f %f %f\n", catalog[i].X, catalog[i].Y, catalog[i].mag);
  }
}

