Index: trunk/Ohana/src/relphot/include/relphot.h
===================================================================
--- trunk/Ohana/src/relphot/include/relphot.h	(revision 3466)
+++ trunk/Ohana/src/relphot/include/relphot.h	(revision 4796)
@@ -4,10 +4,4 @@
 /* # define GRID_V1 */
 # define GRID_V2
-
-static union { unsigned char c[4]; float f; } f_undef = { 0xff, 0xff, 0xff, 0xfe };
-# define fUNDEF (f_undef.f)
-
-static union { unsigned char c[8]; float d; } d_undef = { 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00 };
-# define dUNDEF (d_undef.d)
 
 typedef struct {
@@ -95,4 +89,12 @@
 int TimeSelect;
 unsigned int TSTART, TSTOP;
+
+# ifdef GRID_V1
+int setGridMeasure (int meas, int cat, double X, double Y);
+# endif
+
+# ifdef GRID_V2
+int setGridMeasure (int meas, int cat, double X, double Y, int ccdnum);
+# endif
 
 /***** prototypes ****/
@@ -139,15 +141,5 @@
 void reload_catalogs (GSCRegion *region, int Nregion, GSCRegion *fullregion);
 void free_catalogs (Catalog *catalog, int Ncatalog);
-
-# ifdef GRID_V1
-int setGridMeasure (int meas, int cat, double X, double Y);
-# endif
-
-# ifdef GRID_V2
-int setGridMeasure (int meas, int cat, double X, double Y, int ccdnum);
-# endif
-
 void set_ZP (double ZERO);
-
 char *GetPhotnamebyCode (PhotCodeData *photcodes, int code);
 StatType statsStarS (Catalog *catalog, int Ncatalog);
@@ -157,2 +149,64 @@
 StatType statsImageX (Catalog *catalog);
 StatType statsImageM (Catalog *catalog);
+void plot_scatter (Catalog *catalog, int Ncatalog);
+void plot_defaults (Graphdata *graphdata);
+void plot_list (Graphdata *graphdata, double *xlist, double *ylist, int N, char *label, char *file);
+void plot_stars (Catalog *catalog, int Ncatalog);
+void plot_chisq (Catalog *catalog, int Ncatalog);
+void plot_star_coords (Catalog *catalog, int Ncatalog);
+void plot_grid (Catalog *catalog);
+void dump_grid (); 
+int *SelectRefMosaic (Mosaic **refmosaic, int *Nimage);
+Image *getimage (int N);
+void InterpolateGrid (float *buffer, int Nx, int Ny, Coords *ccd, Coords *gcoords);
+void plot_mosaic_fields (Catalog *catalog);
+void plot_mosaics ();
+void plot_images ();
+void wimages ();
+void clean_mosaics ();
+void freeMosaicBins (int Ncatalog);
+void freeGridBins (int Ncatalog);
+void clean_measures (Catalog *catalog, int Ncatalog, int final);
+void global_stats (Catalog *catalog, int Ncatalog);
+StatType statsImagedM (Catalog *catalog);
+StatType statsMosaicdM (Catalog *catalog);
+StatType statsMosaicM (Catalog *catalog);
+StatType statsMosaicN (Catalog *catalog);
+StatType statsMosaicX (Catalog *catalog);
+Coords *getCoords (int meas, int cat);
+int setExclusions (Catalog *catalog, int Ncatalog);
+void freeImageBins (int Ncatalog);
+void sortA (double *X, int N);
+void sortB (double *X, double *Y, int N);
+void sortC (double *X, double *Y, double *F1, double *F2, int N);
+void sortD (double *X, double *Y, double *Z, int N);
+void initstats (char *mode);
+int liststats (double *value, double *dvalue, int N, StatType *stats);
+
+int dms_to_ddd (double *Value, char *string);
+int str_to_radec (double *ra, double *dec, char *str1, char *str2);
+int chk_time (char *line);
+double sec_to_jd (unsigned long second);
+unsigned long int jd_to_sec (double jd);
+char *sec_to_date (unsigned long second);
+unsigned long date_to_sec (char *date);
+  
+int str_to_time (char *line, unsigned int *second);
+int str_to_dtime (char *line, double *second);
+int Fseek (FILE *f, long offset, int whence);
+void GetConfig (char *config, char *field, char *format, int N, void *ptr);
+void skip_measurements (Catalog *catalog, int pass);
+Image *getimages (int *N);
+
+void setMrelFinal (Catalog *catalog);
+void skip_measurements (Catalog *catalog, int pass);
+GSCRegion *get_regions (double minRa, double maxRa, double minDec, double maxDec, int *Nregions);
+int hms_to_deg (double *h0, double *h1, double *d0, double *d1, char *string);
+GSCRegion *find_regions (Image *image, int Nimage, int *Nregions, GSCRegion *fullregion);
+void getfullregion (Image *image, int Nimage, GSCRegion *fullregion);
+void setMcalFinal (Image *image, int Nimage);
+int gcatalog (Catalog *catalog, int FINAL);
+void write_coords (Header *header, Coords *coords);
+void wcatalog (Catalog *catalog);
+int setMrelOutput (Catalog *catalog, int Ncatalog, int mark);
+int setMcalOutput (Catalog *catalog, int Ncatalog);
