Index: trunk/Ohana/src/libautocode/Makefile
===================================================================
--- trunk/Ohana/src/libautocode/Makefile	(revision 3519)
+++ trunk/Ohana/src/libautocode/Makefile	(revision 3536)
@@ -27,5 +27,8 @@
 	@echo done autocode
 
+# remember to add entries here to libohana/Makefile:AOBJ as well
 LIBOBJ = \
+$(SRC)/photreg.$(ARCH).o \
+$(SRC)/photreg-old.$(ARCH).o \
 $(SRC)/smpdata.$(ARCH).o \
 $(SRC)/spectrum.$(ARCH).o \
@@ -33,4 +36,6 @@
 
 LIBINC = \
+$(INC)/photreg.h \
+$(INC)/photreg-old.h \
 $(INC)/smpdata.h \
 $(INC)/spectrum.h \
Index: trunk/Ohana/src/libautocode/def/common.h
===================================================================
--- trunk/Ohana/src/libautocode/def/common.h	(revision 3519)
+++ trunk/Ohana/src/libautocode/def/common.h	(revision 3536)
@@ -31,2 +31,13 @@
 # endif
 
+# define e_time unsigned int
+
+/*** 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 
+***/
+
Index: trunk/Ohana/src/libautocode/def/photreg-old.d
===================================================================
--- trunk/Ohana/src/libautocode/def/photreg-old.d	(revision 3536)
+++ trunk/Ohana/src/libautocode/def/photreg-old.d	(revision 3536)
@@ -0,0 +1,18 @@
+STRUCT PhotParsOld
+EXTNAME ZERO_POINTS
+TYPE BINTABLE
+SIZE 100
+
+# elements of data structure / FITS table
+
+FIELD ZP,    	  ZP_OBS,     float,       measured zero point,       mag
+FIELD ZPo,   	  ZP_REF,     float, 	   nominal zero point,        mag
+FIELD dZP,   	  ZP_ERR,     float, 	   error on zero point,       mag
+FIELD K,     	  C_AIRMASS,  float, 	   airmass coeff,             mag per airmass
+FIELD X,     	  C_COLOR,    float, 	   color coeff,               mag per mag
+FIELD tstart,	  START_TIME, e_time,      start time of measurement, seconds since 1 Jan 1970 UT
+FIELD tstop, 	  STOP_TIME,  e_time,      stop time of measurement,  seconds since 1 Jan 1970 UT
+FIELD c1,    	  C1_CODE,    short, 	   code 1 for color,          photcode
+FIELD c2,    	  C2_CODE,    short, 	   code 2 for color,          photcode
+FIELD photcode,   PHOTCODE,   short, 	   photcode,                  photcode
+FIELD label,      LABEL,      char[66],    data label
Index: trunk/Ohana/src/libautocode/def/photreg.d
===================================================================
--- trunk/Ohana/src/libautocode/def/photreg.d	(revision 3536)
+++ trunk/Ohana/src/libautocode/def/photreg.d	(revision 3536)
@@ -0,0 +1,21 @@
+STRUCT PhotPars
+EXTNAME ZERO_POINTS_3.0
+TYPE BINTABLE
+SIZE 108
+
+# elements of data structure / FITS table
+
+FIELD ZP,    	  ZP_OBS,     float,       measured zero point,       mag
+FIELD ZPo,   	  ZP_REF,     float, 	   nominal zero point,        mag
+FIELD dZP,   	  ZP_ERR,     float, 	   error on zero point,       mag
+FIELD K,     	  C_AIRMASS,  float, 	   airmass coeff,             mag per airmass
+FIELD X,     	  C_COLOR,    float, 	   color coeff,               mag per mag
+FIELD tstart,	  START_TIME, e_time,      start time of measurement, seconds since 1 Jan 1970 UT
+FIELD tstop, 	  STOP_TIME,  e_time,      stop time of measurement,  seconds since 1 Jan 1970 UT
+FIELD c1,    	  C1_CODE,    short, 	   code 1 for color,          photcode
+FIELD c2,    	  C2_CODE,    short, 	   code 2 for color,          photcode
+FIELD photcode,   PHOTCODE,   short, 	   photcode,                  photcode
+FIELD label,      LABEL,      char[64],    data label
+FIELD refcode,    REFCODE,    short, 	   photcode,                  photcode
+FIELD Ntime,      N_TIME,     int, 	   number of times
+FIELD Nmeas,      N_MEAS,     int, 	   number of measurements
Index: trunk/Ohana/src/libautocode/def/spectrum.d
===================================================================
--- trunk/Ohana/src/libautocode/def/spectrum.d	(revision 3519)
+++ trunk/Ohana/src/libautocode/def/spectrum.d	(revision 3536)
@@ -1,3 +1,2 @@
-# name of structure type
 STRUCT  Spectrum
 EXTNAME SPECTRUM_DATABASE
Index: trunk/Ohana/src/libautocode/generate
===================================================================
--- trunk/Ohana/src/libautocode/generate	(revision 3519)
+++ trunk/Ohana/src/libautocode/generate	(revision 3536)
@@ -103,4 +103,5 @@
 	if ($type eq "short")  { $pt1 = "I"; }
 	if ($type eq "int")    { $pt1 = "J"; }
+	if ($type eq "e_time") { $pt1 = "J"; }
 	if ($type eq "float")  { $pt1 = "E"; }
 	if ($type eq "double") { $pt1 = "D"; }
@@ -125,4 +126,5 @@
 	if ($type eq "short")  { $pt1 = sprintf "I%s", $length; }
 	if ($type eq "int")    { $pt1 = sprintf "I%s", $length; }
+	if ($type eq "e_time") { $pt1 = sprintf "I%s", $length; }
 	if ($type eq "float")  { $pt1 = sprintf "F%s", $length; }
 	if ($type eq "double") { $pt1 = sprintf "F%s", $length; }
@@ -181,9 +183,13 @@
 	    $n = 2;
 	}
-	if ($type eq "float")  {
+	if ($type eq "int")    {
 	    $T = "WORD";
 	    $n = 4;
 	}
-	if ($type eq "int")    {
+	if ($type eq "e_time")    {
+	    $T = "WORD";
+	    $n = 4;
+	}
+	if ($type eq "float")  {
 	    $T = "WORD";
 	    $n = 4;
@@ -217,8 +223,10 @@
 	    }
 	}
+	if ($type eq "byte")   { $Nbytes += 1; }
+	if ($type eq "short")  { $Nbytes += 2; }
+	if ($type eq "int")    { $Nbytes += 4; }
+	if ($type eq "e_time") { $Nbytes += 4; }
+	if ($type eq "float")  { $Nbytes += 4; }
 	if ($type eq "double") { $Nbytes += 8; }
-	if ($type eq "int")    { $Nbytes += 4; }
-	if ($type eq "short")  { $Nbytes += 2; }
-	if ($type eq "float")  { $Nbytes += 4; }
     }
     return ($Nbytes);
