# include "astro.h"
# define MMIN 14.5

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

  int i, N1, N2, Ncat, Nlast, Nused;
  double dx, dy, Rx, Ry;
  double RA, DEC, dRA, dDEC;
  double *ra, *dec, *mag;
  double X_O, X_X, X_Y, dX, Y_O, Y_X, Y_Y, dY;
  char *c, *ref, filename[200], head[200], obj[200], line[200];
  Stars *stars1, *stars2;

  RA = 500.0;  DEC = 500.0;

  if (argc < 2) {
    fprintf (stderr, "USAGE: extract (gscfile) \n");
    exit (0);
  }

  Ncat = 0.0;
  extract_catalog (argv[1], &ra, &dec, &mag, &Ncat);

  for (i = 0; i < Ncat; i++) {
    if ((hypot (ra[i] - RA, dec[i] - DEC) > 0.0006) && (mag[i] < MMIN)) {
      fprintf (stdout, "%8.4f %8.4f %4.1f\n", ra[i], dec[i], mag[i]);
    }
    RA = ra[i];  DEC = dec[i];
  }

}


