Index: /trunk/Ohana/src/libohana/Makefile
===================================================================
--- /trunk/Ohana/src/libohana/Makefile	(revision 2796)
+++ /trunk/Ohana/src/libohana/Makefile	(revision 2797)
@@ -28,5 +28,5 @@
 $(SRC)/Fread.$(ARCH).o		$(SRC)/glockfile.$(ARCH).o	 \
 $(SRC)/LoadPhotcodes.$(ARCH).o  $(SRC)/photfits.$(ARCH).o	 \
-$(SRC)/phot_catalog.$(ARCH).o
+$(SRC)/phot_catalog.$(ARCH).o   $(SRC)/imreg_datatypes.$(ARCH).o
 
 $(DESTLIB)/libohana.a: $(LIB)/libohana.$(ARCH).a
Index: /trunk/Ohana/src/libohana/include/loneos.h
===================================================================
--- /trunk/Ohana/src/libohana/include/loneos.h	(revision 2796)
+++ /trunk/Ohana/src/libohana/include/loneos.h	(revision 2797)
@@ -1,21 +1,35 @@
+
+/*** this file uses data types which must have fixed sizes regardless 
+     of the platform.  It originally used the basic C primitives: 
+       float, double, int, short int, unsigned long int, etc.
+     this breaks under 64 bit (and probably on other systems).
+     I should define internal data types which should be set by the 
+     use of # define statements if needed.  I will cheat for now and use
+     the time_t to replace unsigned long int in this file 
+***/
 
 # ifndef LONEOS_H
 # define LONEOS_H
 
+# define e_time unsigned int
+
 /* image data modes in RegImage */
-# define MODE_NONE   0  /* not defined */
-# define MODE_MEF    1  /* chip of mef image */
-# define MODE_SPLIT  2  /* chip of split image */
-# define MODE_SINGLE 3  /* single chip, not mosaic */
-# define MODE_CUBE   4  /* cube entry */
-# define MODE_SLICE  5  /* slice of a cube */
-# define MODE_MODES  6  /* not used? */
-
-# define TYPE_NONE   0
-# define TYPE_OBJECT 1
-# define TYPE_DARK   2
-# define TYPE_BIAS   3
-# define TYPE_FLAT   4
-
+enum {T_UNDEF = -1, T_NONE, T_OBJECT, T_DARK, T_BIAS, T_FLAT, T_MASK, T_FRINGE, T_SCATTER, T_MODES, T_FRINGEPTS, T_ANY, N_TYPE};
+enum {M_UNDEF = -1, M_NONE, M_MEF, M_SPLIT, M_SINGLE, M_CUBE, M_SLICE, M_MODES, N_MODE};
+
+# if (0) 
+  # define MODE_NONE   0  /* not defined */
+  # define MODE_MEF    1  /* chip of mef image */
+  # define MODE_SPLIT  2  /* chip of split image */
+  # define MODE_SINGLE 3  /* single chip, not mosaic */
+  # define MODE_CUBE   4  /* cube entry */
+  # define MODE_SLICE  5  /* slice of a cube */
+  # define MODE_MODES  6  /* not used? */
+
+  # define TYPE_NONE   0
+  # define TYPE_OBJECT 1
+  # define TYPE_DARK   2
+  # define TYPE_BIAS   3
+  # define TYPE_FLAT   4
 /** these are no longer used by imregister-3.0 
     status:imrough uses the imregister-3.0 values
@@ -23,4 +37,6 @@
     or be removed!
 **/
+# endif
+
 
 # define IMREG_DIST  0x01 /* image distributed, only imregister-3.0 */
@@ -116,6 +132,6 @@
   float ra, dec;
 
-  unsigned long int obstime;
-  unsigned long int regtime;
+  e_time obstime;
+  e_time regtime;
 } RegImage;  /* 360 bytes / image */
 
@@ -127,5 +143,5 @@
   float exptime;
   float airmass;
-  unsigned long int obstime;
+  e_time obstime;
   short int ccdnum;
   char junk1, junk2;
@@ -135,7 +151,7 @@
 /* Old Detrend Database structure */
 typedef struct {
-  unsigned long int tstart;
-  unsigned long int tstop;
-  unsigned long int treg;
+  e_time tstart;
+  e_time tstop;
+  e_time treg;
   float sigma, clipsigma;
   int type;
@@ -148,7 +164,7 @@
 /* Detrend Database structure */
 typedef struct {
-  unsigned long int tstart;
-  unsigned long int tstop;
-  unsigned long int treg;
+  e_time tstart;
+  e_time tstop;
+  e_time treg;
   float exptime;
   int type;
@@ -171,6 +187,6 @@
   float K;                    /* airmass term used */
   float X;                    /* color term used */
-  unsigned long int tstart;   /* start time of observation */
-  unsigned long int tstop;    /* end time of observation */
+  e_time tstart;   /* start time of observation */
+  e_time tstop;    /* end time of observation */
   short int c1;               /* photcode for color term */
   short int c2;               /* photcode for color term */
@@ -186,6 +202,6 @@
   float K;                    /* airmass term used */
   float X;                    /* color term used */
-  unsigned long int tstart;   /* start time of observation */
-  unsigned long int tstop;    /* end time of observation */
+  e_time tstart;   /* start time of observation */
+  e_time tstop;    /* end time of observation */
   short int c1;               /* photcode for color term */
   short int c2;               /* photcode for color term */
@@ -443,3 +459,8 @@
 void coords_precess (double *ra, double *dec, double in_epoch, double out_epoch);
 
+int get_image_type (char *name);
+char *get_type_name (int type);
+int get_image_mode (char *name);
+char *get_mode_name (int mode);
+
 # endif
