Index: trunk/Ohana/src/addstar/include/addstar.h
===================================================================
--- trunk/Ohana/src/addstar/include/addstar.h	(revision 5322)
+++ trunk/Ohana/src/addstar/include/addstar.h	(revision 5328)
@@ -52,15 +52,17 @@
 
 /* these globals modify the behavior of gstars (KEEP) */
-double SNLIMIT;
-int    ACCEPT_ASTROM;  // accept even bad astrometry solutions (NASTRO == 0)
-int    TEXTMODE;       // force input file to be loaded as RAW
-char  *DUMP;           // dump out intermediate results
-int    XOVERSCAN;      // used to modify stored image dimensions 
-int    YOVERSCAN;      // used to modify stored image dimensions 
-int    XMIN;           // used to filter loaded star list 
-int    XMAX;           // used to filter loaded star list 
-int    YMIN;           // used to filter loaded star list 
-int    YMAX;           // used to filter loaded star list 
-double Latitude;       // carried into image structure from config
+double 	SNLIMIT;
+int    	ACCEPT_ASTROM;  // accept even bad astrometry solutions (NASTRO == 0)
+int    	TEXTMODE;       // force input file to be loaded as RAW
+int     SUBPIX;         // apply a subpix correction
+char   *DUMP;           // dump out intermediate results
+int    	XOVERSCAN;      // used to modify stored image dimensions 
+int    	YOVERSCAN;      // used to modify stored image dimensions 
+int    	XMIN;           // used to filter loaded star list 
+int    	XMAX;           // used to filter loaded star list 
+int    	YMIN;           // used to filter loaded star list 
+int    	YMAX;           // used to filter loaded star list 
+double 	Latitude;       // carried into image structure from config
+Coords *MOSAIC;         // carries the mosaic into gstars
 
 /* these globals are used separately by both client and server (KEEP) */
@@ -68,31 +70,7 @@
 int    VERBOSE;
 
-/* add to options as an int / keep the global? */
-PhotCode *thiscode;
-
-/* how to carry this around? */
-Coords   *MOSAIC;
-
-/* globals set by command-line options (AddstarClientOptions) */
-/* move into AddstarClientOptions completely */
-# if (0)
-int    MODE;
-int    EXISTING_REGIONS;
-int    ONLY_MATCH;
-int    SKIP_MISSED;
-int    REPLACE;
-int    CLOSEST;
-int    NOSORT;
-int    UPDATE;
-int    ONLY_IMAGES;
-int    CALIBRATE;
-double DEFAULT_RADIUS;   // XXX add to AddstarClientOptions
-double NSIGMA;           // XXX add to AddstarClientOptions
-# endif
-
 /* modify server behavoir (make this an addstar cleanup mode?) */
 int    FORCE_READ;
 
-int   SKYPROBE;  
 // XXX this should be replaced with 
 // 1) an airmass accuracy option
@@ -126,17 +104,17 @@
 int        dump_rawstars          PROTO((Stars *stars, int Nstars));
 int        edge_check             PROTO((double *x1, double *y1, double *x2, double *y2));
-void       find_matches           PROTO((GSCRegion *region, Stars *stars, int Nstars, Catalog *catalog, Image *image, Image *overlap, int Noverlap, AddstarClientOptions options));
-void       find_matches_closest   PROTO((GSCRegion *region, Stars *stars, int Nstars, Catalog *catalog, Image *image, Image *overlap, int Noverlap, AddstarClientOptions options));
+void       find_matches           PROTO((GSCRegion *region, Stars *stars, int Nstars, Catalog *catalog, Image *image, Image *overlap, int Noverlap, Coords *mosaic, AddstarClientOptions options));
+void       find_matches_closest   PROTO((GSCRegion *region, Stars *stars, int Nstars, Catalog *catalog, Image *image, Image *overlap, int Noverlap, Coords *mosaic, AddstarClientOptions options));
 void       find_matches_refstars  PROTO((GSCRegion *region, Stars **stars, int Nstars, Catalog *catalog, AddstarClientOptions options));
 Stars    **find_subset            PROTO((GSCRegion *region, Stars *stars, int Nstars, int *NSTARS));
 int        gcatalog               PROTO((Catalog *catalog));
-Stars     *get2mass               PROTO((GSCRegion *patch, int *NSTARS, int mode));
+Stars     *get2mass               PROTO((GSCRegion *patch, int photcode, int mode, int *NSTARS));
 double     get_subpix             PROTO((double x, double y));
 Stars     *getgsc                 PROTO((GSCRegion *patch, int *NSTARS));
-Stars     *getusno                PROTO((GSCRegion *catstats, int *Nstars));
-Image     *gimages                PROTO((FITS_DB *db, Image *image, int *Npimage));
-Stars     *grefcat                PROTO((char *Refcat, GSCRegion *catstats, int *nstars));
-Stars     *grefstars              PROTO((char *file, int *Nstars));
-GSCRegion *gregion_image          PROTO((Image *image, int *Nregions));
+Stars     *getusno                PROTO((GSCRegion *catstats, int photcode, int *Nstars));
+Image     *gimages                PROTO((FITS_DB *db, Image *image, Coords *mosaic, int *Npimage));
+Stars     *grefcat                PROTO((char *Refcat, GSCRegion *catstats, int photcode, int *nstars));
+Stars     *grefstars              PROTO((char *file, int photcode, int *Nstars));
+GSCRegion *gregion_image          PROTO((Image *image, Coords *mosaic, int *Nregions));
 GSCRegion *gregion_match          PROTO((GSCRegion *regions, int *nregions));
 GSCRegion *gregion_patch          PROTO((GSCRegion *patch, int *nregions));
@@ -144,5 +122,5 @@
 GSCRegion *gregion_stars          PROTO((Stars *stars, int Nstars, int *Nregion));
 GSCRegion *gregions               PROTO((Image *image, int *Nregions));
-Stars     *gstars                 PROTO((char *file, int *NSTARS, Image *image));
+Stars     *gstars                 PROTO((char *file, int *NSTARS, int photcode, Image *image));
 void       help                   PROTO(());
 int        in_image               PROTO((double r, double d, Image *image));
