Index: trunk/Ohana/src/addstar/include/addstar.h
===================================================================
--- trunk/Ohana/src/addstar/include/addstar.h	(revision 4538)
+++ trunk/Ohana/src/addstar/include/addstar.h	(revision 4805)
@@ -106,56 +106,75 @@
 time_t TIMEREF;
 
-int main (int argc, char **argv);
-int Shutdown (char *message, ...);  
-void TrapSignal (int sig);
-int SetSignals ();
-void help ();
-int args (int argc, char **argv);
-void SetProtect (int mode);
+/*** addstar prototypes ***/
+void       AddToCalibration       PROTO((Average *average, Measure *measure, Measure *new, int Nstar));
+void       ConfigInit             PROTO((int *argc, char **argv));
+void       FindCalibration        PROTO((Image *image));
+int        FindDecBand            PROTO((double dec, double *DEC0, double *DEC1));
+int        FindRegionByPoint      PROTO((GSCRegion *regions, double ra, double dec, GSCRegion *gsc, int Ngsc));
+int        FindRegionDecBandStart PROTO((GSCRegion *region, int Nregion, double dec));
+int        FindRegionDecBandStop  PROTO((GSCRegion *region, int Nregion, double dec));
+FILE      *GetDB                  PROTO((int *state));
+void       InitCalibration        PROTO(());
+GSCRegion *LoadRegions            PROTO((int *nregions));
+void       SaveCalibration        PROTO((float M, float dM, float Mr, float dMr, float Mc, float A, int N));
+void       SetProtect             PROTO((int mode));
+int        SetSignals             PROTO(());
+int        Shutdown               PROTO((char *message, ...); ) 
+void       TrapSignal             PROTO((int sig));
+short      airmass                PROTO((short secz_image, double ra, double dec, double st, double latitude));
+void       aregion                PROTO((GSCRegion *region, FILE *f, double ra, double dec));
+int        args                   PROTO((int argc, char **argv));
+void       check_permissions      PROTO((char *basefile));
+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));
+void       find_matches_refstars  PROTO((GSCRegion *region, Stars **stars, int Nstars, Catalog *catalog));
+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));
+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((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));
+GSCRegion *gregion_match          PROTO((GSCRegion *regions, int *nregions));
+GSCRegion *gregion_patch          PROTO((GSCRegion *patch, int *nregions));
+void       gregion_star           PROTO((Stars *star, GSCRegion *region));
+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));
+void       help                   PROTO(());
+int        hms_to_deg             PROTO((double *h0, double *h1, double *d0, double *d1, char *string));
+int        in_image               PROTO((double r, double d, Image *image));
+int        load_pt_catalog        PROTO((Catalog *catalog, GSCRegion *region));  /*** choose new name ***/
+void       load_subpix            PROTO(());
+void       lock_image_db          PROTO(());
+int        main                   PROTO((int argc, char **argv));
+void       make_backup            PROTO((char *filename));
+int        match_refstars         PROTO((Stars *stars, int Nstars));
+void       mkcatalog              PROTO((GSCRegion *region, Catalog *catalog));
+double     opening_angle          PROTO((double x1, double y1, double x2, double y2, double x3, double y3));
+int        parse_time             PROTO((Header *header));
+Stars     *rd_gsc                 PROTO((char *filename, int *nstars));
+int        replace_match          PROTO((Average *average, Measure *measure, Stars *star));
+Stars     *rfits                  PROTO((FILE *f, int *nstars));
+Stars     *rtext                  PROTO((FILE *f, int *nstars));
+void       save_pt_catalog        PROTO((Catalog *catalog));  /*** choose new name ***/
+double     scat_subpix            PROTO((double x, double y));
+time_t     short_date_to_sec      PROTO((char *date));
+void       sort_lists             PROTO((float *X, float *Y, int *S, int N));
+void       sort_regions           PROTO((GSCRegion *region, int N));
+void       sort_stars             PROTO((Stars *stars, int N));
+int        str_to_radec           PROTO((double *ra, double *dec, char *str1, char *str2));
+void       unlock_image_db        PROTO((Image *image));
+void       update_coords          PROTO((Average *average, Measure *measure, int *next));
+void       wcatalog               PROTO((Catalog *catalog));
+void       wimage                 PROTO((Image *image));
 
-int gcatalog (Catalog *catalog);
-void gregion_star (Stars *star, GSCRegion *region);
-GSCRegion *gregion_image (Image *image, int *Nregions);
-int edge_check (double *x1, double *y1, double *x2, double *y2);
-double opening_angle (double x1, double y1, double x2, double y2, double x3, double y3);
-Stars *gstars (char *file, int *NSTARS, Image *image);
-int in_image (double r, double d, Image *image);
-void wcatalog (Catalog *catalog);
-void ConfigInit (int *argc, char **argv);
-void aregion (GSCRegion *region, FILE *f, double ra, double dec);
-short airmass (short secz_image, double ra, double dec, double st, double latitude);
-void InitCalibration ();
-void FindCalibration (Image *image);
-double get_subpix (double x, double y);
-void load_subpix ();
-double scat_subpix (double x, double y);
-void mkcatalog (GSCRegion *region, Catalog *catalog);
-Stars *grefstars (char *file, int *Nstars);
-Stars **find_subset (GSCRegion *region, Stars *stars, int Nstars, int *NSTARS);
-int match_refstars (Stars *stars, int Nstars);
-int parse_time (Header *header);
-
-void check_permissions (char *basefile);
-void make_backup (char *filename);
-void uppercase (char *string);
-
-void sort_lists (float *X, float *Y, int *S, int N);
-void fsort (float *X, int N);
-void fsort2 (float *X, float *Y, int N);
-void sort_stars (Stars *stars, int N);
-void sort_regions (GSCRegion *region, int N);
-
-char *sec_to_date (time_t second);
-double sec_to_jd (time_t second);
-int chk_time (char *line);
-int dms_to_ddd (double *Value, char *string);
-int hms_to_deg (double *h0, double *h1, double *d0, double *d1, char *string);
-int str_to_dtime (char *line, double *second);
-int str_to_radec (double *ra, double *dec, char *str1, char *str2);
-int str_to_time (char *line, time_t *second);
-time_t jd_to_sec (double jd);
-time_t date_to_sec (char *date);
-time_t short_date_to_sec (char *date);
-
+void       uppercase              PROTO((char *string));
+void       fsort                  PROTO((float *X, int N));
+void       fsort2                 PROTO((float *X, float *Y, int N));
 
 /** 
@@ -168,49 +187,2 @@
 **/
 
-Stars *get2mass (GSCRegion *patch, int *NSTARS, int mode);
-GSCRegion *gregion_stars (Stars *stars, int Nstars, int *Nregion);
-Stars *grefstars (char *file, int *Nstars);
-GSCRegion *LoadRegions (int *nregions);
-int FindRegionByPoint (GSCRegion *regions, double ra, double dec, GSCRegion *gsc, int Ngsc);
-int FindRegionDecBandStart (GSCRegion *region, int Nregion, double dec);
-int FindRegionDecBandStop (GSCRegion *region, int Nregion, double dec);
-int FindDecBand (double dec, double *DEC0, double *DEC1);
-
-int hms_to_deg (double *h0, double *h1, double *d0, double *d1, char *string);
-void find_matches_refstars (GSCRegion *region, Stars **stars, int Nstars, Catalog *catalog);
-Stars *gstars (char *file, int *NSTARS, Image *image);
-void find_matches (GSCRegion *region, Stars *stars, int Nstars, Catalog *catalog, Image *image, Image *overlap, int Noverlap);
-Stars *getusno (GSCRegion *catstats, int *Nstars);
-Stars *rd_gsc (char *filename, int *nstars);
-Stars *getgsc (GSCRegion *patch, int *NSTARS);
-Stars *grefcat (char *Refcat, GSCRegion *catstats, int *nstars);
-void load_subpix ();
-double get_subpix (double x, double y);
-double scat_subpix (double x, double y);
-void help ();
-int args (int argc, char **argv);
-void InitCalibration ();
-void SaveCalibration (float M, float dM, float Mr, float dMr, float Mc, float A, int N);
-void AddToCalibration (Average *average, Measure *measure, Measure *new, int Nstar);
-void FindCalibration (Image *image);
-int load_pt_catalog (Catalog *catalog, GSCRegion *region);  /*** choose new name ***/
-void save_pt_catalog (Catalog *catalog);  /*** choose new name ***/
-void wcatalog (Catalog *catalog);
-GSCRegion *gregions (Image *image, int *Nregions);
-int gcatalog (Catalog *catalog);
-GSCRegion *gregion_image (Image *image, int *Nregions);
-void update_coords (Average *average, Measure *measure, int *next);
-int replace_match (Average *average, Measure *measure, Stars *star);
-FILE *GetDB (int *state);
-void lock_image_db ();
-void unlock_image_db (Image *image);
-void wimage (Image *image);
-Image *gimages (Image *image, int *Npimage);
-double opening_angle (double x1, double y1, double x2, double y2, double x3, double y3);
-int edge_check (double *x1, double *y1, double *x2, double *y2);
-GSCRegion *gregion_match (GSCRegion *regions, int *nregions);
-GSCRegion *gregion_patch (GSCRegion *patch, int *nregions);
-int dump_rawstars (Stars *stars, int Nstars);
-Stars *rfits (FILE *f, int *nstars);
-Stars *rtext (FILE *f, int *nstars);
-
