Index: trunk/Ohana/Makefile.Common
===================================================================
--- trunk/Ohana/Makefile.Common	(revision 39455)
+++ trunk/Ohana/Makefile.Common	(revision 39457)
@@ -129,4 +129,5 @@
 	for i in $(TESTPROG); do rm -f $(TESTBIN)/$$i; done
 	for i in $(TESTPROG); do rm -f $(TESTDIR)/$$i.$(ARCH); done
+	for i in $(TESTPROG); do rm -f $(TESTDIR)/$$i.$(ARCH).o; done
 
 dist: clean
Index: trunk/Ohana/configure.tcsh
===================================================================
--- trunk/Ohana/configure.tcsh	(revision 39455)
+++ trunk/Ohana/configure.tcsh	(revision 39457)
@@ -14,5 +14,5 @@
 set memcheck = 0
 set use_tcmalloc = 0
-set use_gnu99 = 0
+set use_gnu89 = 0
 set no_largefiles = 0
 set extra_safety_checks = 0
@@ -90,6 +90,7 @@
    set use_tcmalloc = 1
    breaksw;
-  case --use-gnu99
-   set use_gnu99 = 1
+  case --use-gnu89
+   set use_gnu89 = 1
+   echo "---- warning : gnu89 is now deprecated"
    breaksw;
   case --no-largefiles
@@ -211,9 +212,13 @@
 if ($sanitize_address) set CFLAGS = "$CFLAGS -fsanitize=address"
 
+# gnu c99 fails due to missing flockfile prototype
+# we are forced to used gnu99 
+# -std=gnu89 fails with -pedantic tests because we use VA_ARGS in macros (allowed by gnu but not C89)
+
 # use_gnu99
-if ($use_gnu99) then
+if ($use_gnu89 && ($extra_safety_checks == 0)) then
+    set CFLAGS = "$CFLAGS -std=gnu89"
+else
     set CFLAGS = "$CFLAGS -std=gnu99"
-else
-    set CFLAGS = "$CFLAGS -std=gnu89"
 endif
 
@@ -232,5 +237,7 @@
 # other temp flags
 if ($extra_safety_checks) then
-  set CPPFLAGS = "$CPPFLAGS -fstack-check -fstack-protector-all -D_FORTIFY_SOURCE=2 -Wstrict-aliasing=2 -fno-strict-aliasing -Wextra -pedantic"
+  set CPPFLAGS = "$CPPFLAGS -fstack-check -fstack-protector-all -D_FORTIFY_SOURCE=2 -Wstrict-aliasing=2 -fno-strict-aliasing -pedantic"
+  set CPPFLAGS = "$CPPFLAGS -Wclobbered -Wempty-body -Wignored-qualifiers -Wmissing-field-initializers -Wmissing-parameter-type -Wold-style-declaration -Woverride-init -Wtype-limits -Wuninitialized -Wunused-parameter -Wunused-but-set-parameter"
+  set CPPFLAGS = "$CPPFLAGS -Wsign-compare"
 endif
 
@@ -717,9 +724,12 @@
   --enable-profile          enable 
   --enable-sanitize-address enable 
+  --extra-safety-checks     enable extra gcc safety checks
   --enable-memcheck         enable ohana memory tests
+  --enable-debug-build      enable debug build
   --pedantic                include -Wall -Werror on compilation
   --use-tcmalloc            use the alternate tcmalloc from Google
-  --use-gnu99               use gnu99 flags to ensure C99 compatibility
+  --use-gnu89               use gnu89 for possible backwards compatibility (probably will not work)
   --no-largefiles           skip large file compatibility
+  --enable-no-as-needed     pass --no-as-needed flag to linker
 
 Installation directories:
@@ -745,4 +755,8 @@
   --no-create
   --no-recursion
+  --disable-shared
+  --enable-shared
+  --disable-static
+  --enable-static
   --sbindir
   --libexecdir
Index: trunk/Ohana/src/addstar/src/ConfigInit.c
===================================================================
--- trunk/Ohana/src/addstar/src/ConfigInit.c	(revision 39455)
+++ trunk/Ohana/src/addstar/src/ConfigInit.c	(revision 39457)
@@ -224,5 +224,5 @@
 
   /* get detection filtering mask */
-  if (!ScanConfig (config, "DETECTIONFILTER", "%d", 0, &options.detectionFilter)) {
+  if (!ScanConfig (config, "DETECTIONFILTER", "%u", 0, &options.detectionFilter)) {
       options.detectionFilter = 0;
   }
Index: trunk/Ohana/src/addstar/src/LoadDataSDSS.c
===================================================================
--- trunk/Ohana/src/addstar/src/LoadDataSDSS.c	(revision 39455)
+++ trunk/Ohana/src/addstar/src/LoadDataSDSS.c	(revision 39457)
@@ -5,4 +5,5 @@
 // each SDSS data set corresponds to 5 images (ugriz)
 Catalog *LoadDataSDSS (FILE *f, char *imagename, Image **images, off_t *nvalid, Header **headers, off_t *extsize, HeaderSet *headerSets, off_t Nimages) {
+  OHANA_UNUSED_PARAM(Nimages);
 
   off_t Nskip, Nvalid, NVALID;
Index: trunk/Ohana/src/addstar/src/ReadImageHeader.c
===================================================================
--- trunk/Ohana/src/addstar/src/ReadImageHeader.c	(revision 39455)
+++ trunk/Ohana/src/addstar/src/ReadImageHeader.c	(revision 39457)
@@ -209,5 +209,5 @@
   }
 
-  if (!gfits_scan (header, ImageIDKeyword, "%d", 1, &image[0].externID)) {
+  if (!gfits_scan (header, ImageIDKeyword, "%u", 1, &image[0].externID)) {
     image[0].externID = 0;
   }
@@ -272,5 +272,5 @@
 
   /* find expected number of stars */
-  if (!gfits_scan (header, "NSTARS", "%d", 1, &image[0].nstar) && !NO_STARS) {
+  if (!gfits_scan (header, "NSTARS", "%u", 1, &image[0].nstar) && !NO_STARS) {
     fprintf (stderr, "WARNING: can't get NSTARS from header (TEXT mode will be invalid)\n");
   }
Index: trunk/Ohana/src/addstar/src/ReadStarsFITS.c
===================================================================
--- trunk/Ohana/src/addstar/src/ReadStarsFITS.c	(revision 39455)
+++ trunk/Ohana/src/addstar/src/ReadStarsFITS.c	(revision 39457)
@@ -43,4 +43,5 @@
 // corresponding image header, load the stars from the table
 Catalog *ReadStarsFITS (FILE *f, Header *header, Header *in_theader) {
+  OHANA_UNUSED_PARAM(header);
 
   off_t Nskip;
Index: trunk/Ohana/src/addstar/src/SkyRegionUtils.c
===================================================================
--- trunk/Ohana/src/addstar/src/SkyRegionUtils.c	(revision 39455)
+++ trunk/Ohana/src/addstar/src/SkyRegionUtils.c	(revision 39457)
@@ -2,4 +2,5 @@
 
 SkyList *SkyListExistingSubset (SkyList *input, char *path) {
+  OHANA_UNUSED_PARAM(path);
   
   int i, status, Nsubset, NSUBSET;
Index: trunk/Ohana/src/addstar/src/build_links.c
===================================================================
--- trunk/Ohana/src/addstar/src/build_links.c	(revision 39455)
+++ trunk/Ohana/src/addstar/src/build_links.c	(revision 39457)
@@ -27,4 +27,5 @@
    not partial, and has a correct set of average[].measureOffset,Nmeasure values */
 off_t *init_measure_links (Average *average, off_t Naverage, Measure *measure, off_t Nmeasure) {
+  OHANA_UNUSED_PARAM(measure);
 
   off_t i, j, N;
@@ -161,4 +162,5 @@
 /* build the initial links assuming the table is sorted */
 off_t *init_missing_links (Average *average, off_t Naverage, Missing *missing, off_t Nmissing) {
+  OHANA_UNUSED_PARAM(missing);
 
   off_t i, j, N;
@@ -229,4 +231,5 @@
    not partial, and has a correct set of average[].lensingOffset,Nlensing values */
 off_t *init_lensing_links (Average *average, off_t Naverage, Lensing *lensing, off_t Nlensing) {
+  OHANA_UNUSED_PARAM(lensing);
 
   off_t i, j, N;
Index: trunk/Ohana/src/addstar/src/calibrate.c
===================================================================
--- trunk/Ohana/src/addstar/src/calibrate.c	(revision 39455)
+++ trunk/Ohana/src/addstar/src/calibrate.c	(revision 39457)
@@ -157,5 +157,7 @@
   /* create a hash array from Nstar[] entries */
   ALLOCATE (Nlist, int, MaxN + 1);
-  memset (Nlist, 0, MAX (0, MaxN*sizeof(int)));
+  if (MaxN >= 0) {
+    memset (Nlist, 0, sizeof(int));
+  }
   for (i = 0; i < Ncal; i++) {
     Nlist[Nstar[i]] ++;
Index: trunk/Ohana/src/addstar/src/greference.c
===================================================================
--- trunk/Ohana/src/addstar/src/greference.c	(revision 39455)
+++ trunk/Ohana/src/addstar/src/greference.c	(revision 39457)
@@ -4,4 +4,5 @@
 
 Catalog *greference (char *Refcat, SkyRegion *region, int photcode) {
+  OHANA_UNUSED_PARAM(photcode);
 
   Catalog *catalog = NULL;
Index: trunk/Ohana/src/addstar/src/loadgalphot_table.c
===================================================================
--- trunk/Ohana/src/addstar/src/loadgalphot_table.c	(revision 39455)
+++ trunk/Ohana/src/addstar/src/loadgalphot_table.c	(revision 39457)
@@ -3,4 +3,5 @@
 
 int loadgalphot_table (SkyList *skylistInput, HostTable *hosts, char *filename, AddstarClientOptions *options) {
+  OHANA_UNUSED_PARAM(hosts);
   
   int i, Nstars;
Index: trunk/Ohana/src/addstar/src/loadsupercos_rawdata.c
===================================================================
--- trunk/Ohana/src/addstar/src/loadsupercos_rawdata.c	(revision 39455)
+++ trunk/Ohana/src/addstar/src/loadsupercos_rawdata.c	(revision 39457)
@@ -7,4 +7,5 @@
 
 int loadsupercos_rawdata (Image *image, int *imlist, int Nimage, SkyTable *skytable, char *filename, AddstarClientOptions options) {
+  OHANA_UNUSED_PARAM(Nimage);
   
   int i;
Index: trunk/Ohana/src/addstar/src/mkcmf.c
===================================================================
--- trunk/Ohana/src/addstar/src/mkcmf.c	(revision 39455)
+++ trunk/Ohana/src/addstar/src/mkcmf.c	(revision 39457)
@@ -1368,4 +1368,5 @@
 
 int WriteXSRCtable (FILE *fits, char *extroot, double *X, double *Y, double *M, unsigned int *Flag, int Nstars, float zeroPt, float exptime) {
+  OHANA_UNUSED_PARAM(Flag);
 
   int i, j;
@@ -1527,4 +1528,5 @@
 
 int WriteXFITtable (FILE *fits, char *extroot, double *X, double *Y, double *M, unsigned int *Flag, int Nstars) {
+  OHANA_UNUSED_PARAM(Flag);
 
   int i;
@@ -1688,4 +1690,5 @@
 
 int WriteXGALtable (FILE *fits, char *extroot, double *X, double *Y, double *M, unsigned int *Flag, int Nstars) {
+  OHANA_UNUSED_PARAM(Flag);
 
   int i;
@@ -1804,4 +1807,5 @@
 
 int WriteXRADtable (FILE *fits, char *extroot, double *X, double *Y, double *M, unsigned int *Flag, int Nstars, int Nrad) {
+  OHANA_UNUSED_PARAM(Flag);
 
   int i, j, k;
@@ -1881,4 +1885,9 @@
 
 int WriteDETFtable (FILE *fits, char *extroot, double *X, double *Y, double *M, unsigned int *Flag, int Nstars) {
+  OHANA_UNUSED_PARAM(X);
+  OHANA_UNUSED_PARAM(Y);
+  OHANA_UNUSED_PARAM(M);
+  OHANA_UNUSED_PARAM(Flag);
+  OHANA_UNUSED_PARAM(Nstars);
 
   int i;
Index: trunk/Ohana/src/addstar/src/sky_tessalation.c
===================================================================
--- trunk/Ohana/src/addstar/src/sky_tessalation.c	(revision 39455)
+++ trunk/Ohana/src/addstar/src/sky_tessalation.c	(revision 39457)
@@ -202,4 +202,6 @@
 // for local projects such as the PS1 Medium Deep fields
 int sky_tessellation_local (FITS_DB *db, int level, int Nmax) {
+  OHANA_UNUSED_PARAM(level);
+  OHANA_UNUSED_PARAM(Nmax);
 
   int Nimage;
@@ -239,4 +241,6 @@
 // we generate projects on uniform rings of constant dec height
 int sky_tessellation_rings (FITS_DB *db, int level, int Nmax) {
+  OHANA_UNUSED_PARAM(level);
+  OHANA_UNUSED_PARAM(Nmax);
 
   int j, nDEC, Nimage, Nring, Ntotal, Ndigit;
@@ -294,4 +298,6 @@
 // based on code supplied by Tamas 2012.07.23
 int sky_tessellation_tamas (FITS_DB *db, int level, int Nmax) {
+  OHANA_UNUSED_PARAM(level);
+  OHANA_UNUSED_PARAM(Nmax);
 
   int j, nDEC, Nimage, Nring, Ntotal, Ndigit;
@@ -740,4 +746,5 @@
 // format : guide to generate the filenames (c-type string format)
 SkyRectangle *sky_rectangle_tamas (double *Dec, double dm, double halfa, double halftheta, int *nring, char *format) {
+  OHANA_UNUSED_PARAM(halfa);
 
   static int Nname = 0;
Index: trunk/Ohana/src/delstar/src/delete_duplicate_images.c
===================================================================
--- trunk/Ohana/src/delstar/src/delete_duplicate_images.c	(revision 39455)
+++ trunk/Ohana/src/delstar/src/delete_duplicate_images.c	(revision 39457)
@@ -630,4 +630,5 @@
 
 off_t find_obstime_range (Image *image, off_t Nimage, off_t firstEntry) {
+  OHANA_UNUSED_PARAM(image);
 
   Nsubset = 0;
Index: trunk/Ohana/src/delstar/src/delete_fix_LAP.c
===================================================================
--- trunk/Ohana/src/delstar/src/delete_fix_LAP.c	(revision 39455)
+++ trunk/Ohana/src/delstar/src/delete_fix_LAP.c	(revision 39457)
@@ -465,4 +465,5 @@
 
 int delete_fix_LAP_measures (off_t *measureDrop, Catalog *catalog, ImageSubset *image, off_t Nimage) {
+  OHANA_UNUSED_PARAM(Nimage);
 
   /* internal counters */
Index: trunk/Ohana/src/delstar/src/find_image_db.c
===================================================================
--- trunk/Ohana/src/delstar/src/find_image_db.c	(revision 39455)
+++ trunk/Ohana/src/delstar/src/find_image_db.c	(revision 39457)
@@ -83,6 +83,6 @@
 
   for (i = 0; i < Nimage; i++) {
-    if (image[i].tzero < START) continue;
-    if (image[i].tzero > END) continue;
+    if (image[i].tzero < start) continue;
+    if (image[i].tzero > end) continue;
     if (code != NULL) {
       if (image[i].photcode != code[0].code) continue;
Index: trunk/Ohana/src/delstar/src/gimages.c
===================================================================
--- trunk/Ohana/src/delstar/src/gimages.c	(revision 39455)
+++ trunk/Ohana/src/delstar/src/gimages.c	(revision 39457)
@@ -46,13 +46,13 @@
  
   /* get other header info */
-  haveNx = gfits_scan (&header, "NAXIS1",   "%hd", 1, &image[0].NX); 
-  haveNy = gfits_scan (&header, "NAXIS2",   "%hd", 1, &image[0].NY);
+  haveNx = gfits_scan (&header, "NAXIS1",   "%hu", 1, &image[0].NX); 
+  haveNy = gfits_scan (&header, "NAXIS2",   "%hu", 1, &image[0].NY);
   if (!haveNx && !haveNy) {
-      haveNx = gfits_scan (&header, "IMNAXIS1",   "%hd", 1, &image[0].NX); 
-      haveNy = gfits_scan (&header, "IMNAXIS2",   "%hd", 1, &image[0].NY);
+      haveNx = gfits_scan (&header, "IMNAXIS1",   "%hu", 1, &image[0].NX); 
+      haveNy = gfits_scan (&header, "IMNAXIS2",   "%hu", 1, &image[0].NY);
   }      
   if (!haveNx && !haveNy) {
-      haveNx = gfits_scan (&header, "ZNAXIS1",   "%hd", 1, &image[0].NX);
-      haveNy = gfits_scan (&header, "ZNAXIS2",   "%hd", 1, &image[0].NY);
+      haveNx = gfits_scan (&header, "ZNAXIS1",   "%hu", 1, &image[0].NX);
+      haveNy = gfits_scan (&header, "ZNAXIS2",   "%hu", 1, &image[0].NY);
   }
   if (!haveNx || !haveNy) {
Index: trunk/Ohana/src/dvomerge/src/build_links.c
===================================================================
--- trunk/Ohana/src/dvomerge/src/build_links.c	(revision 39455)
+++ trunk/Ohana/src/dvomerge/src/build_links.c	(revision 39457)
@@ -180,4 +180,5 @@
 /* build the initial links assuming the table is sorted */
 off_t *init_missing_links (Average *average, off_t Naverage, Missing *missing, off_t Nmissing) {
+  OHANA_UNUSED_PARAM(missing);
 
   off_t i, j, N;
Index: trunk/Ohana/src/dvomerge/src/dvomergeCreate.c
===================================================================
--- trunk/Ohana/src/dvomerge/src/dvomergeCreate.c	(revision 39455)
+++ trunk/Ohana/src/dvomerge/src/dvomergeCreate.c	(revision 39457)
@@ -4,4 +4,5 @@
 // the output db may have a different SKY_DEPTH from the input dbs
 int dvomergeCreate (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argc);
 
   int depth1, depth2;
Index: trunk/Ohana/src/dvomerge/src/dvorepairDeleteImagesByExternID.c
===================================================================
--- trunk/Ohana/src/dvomerge/src/dvorepairDeleteImagesByExternID.c	(revision 39455)
+++ trunk/Ohana/src/dvomerge/src/dvorepairDeleteImagesByExternID.c	(revision 39457)
@@ -32,4 +32,5 @@
 
 int dvorepairDeleteImagesByExternID (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argc);
 
   FITS_DB db;  // database handle pointing to input image table
@@ -306,4 +307,5 @@
 
 int RepairTableCPT_V1(char *cptFilenameSrc, char *cptFilenameTgt, char *cpsFilenameSrc, char *cpsFilenameTgt, Measure *measure, off_t Nmeasure, Image *image, off_t Nimage, myIndexType *imageIDindex, char catformat) {
+  OHANA_UNUSED_PARAM(Nimage);
 
   off_t *averefMatch;
Index: trunk/Ohana/src/dvomerge/src/dvorepairFixImages.c
===================================================================
--- trunk/Ohana/src/dvomerge/src/dvorepairFixImages.c	(revision 39455)
+++ trunk/Ohana/src/dvomerge/src/dvorepairFixImages.c	(revision 39457)
@@ -126,4 +126,7 @@
 
 int MarkMosaicsToDelete(Image *image, off_t Nimage, int *deleteIndex) {
+  OHANA_UNUSED_PARAM(image);
+  OHANA_UNUSED_PARAM(Nimage);
+  OHANA_UNUSED_PARAM(deleteIndex);
 
   myAbort ("this function needs to be redone with a concept to match the old BuildChipMatch");
Index: trunk/Ohana/src/dvomerge/src/replace_match.c
===================================================================
--- trunk/Ohana/src/dvomerge/src/replace_match.c	(revision 39455)
+++ trunk/Ohana/src/dvomerge/src/replace_match.c	(revision 39457)
@@ -7,4 +7,5 @@
 // average and measure pointers to the objects of interest and their first / current measurement
 int replace_match (Average *average_out, Measure *measure_out, off_t *next_meas, Average *average_in, Measure *measure_in) {
+  OHANA_UNUSED_PARAM(average_in);
 
   int Nout;
Index: trunk/Ohana/src/dvomerge/src/replace_tycho.c
===================================================================
--- trunk/Ohana/src/dvomerge/src/replace_tycho.c	(revision 39455)
+++ trunk/Ohana/src/dvomerge/src/replace_tycho.c	(revision 39457)
@@ -11,4 +11,5 @@
 
 int replace_tycho (Average *averageOut, Measure *measureOut, off_t *next_meas, Average *averageInp, Measure *measureInp) {
+  OHANA_UNUSED_PARAM(averageInp);
 
   int i;
Index: trunk/Ohana/src/fakeastro/src/Shutdown.c
===================================================================
--- trunk/Ohana/src/fakeastro/src/Shutdown.c	(revision 39455)
+++ trunk/Ohana/src/fakeastro/src/Shutdown.c	(revision 39457)
@@ -22,5 +22,5 @@
 
   SetProtect (TRUE);
-  gfits_db_close (db);
+  if (db) gfits_db_close (db);
   fprintf (stderr, "ERROR: relastro halted\n");
   exit (1);
Index: trunk/Ohana/src/fakeastro/src/airmass.c
===================================================================
--- trunk/Ohana/src/fakeastro/src/airmass.c	(revision 39455)
+++ trunk/Ohana/src/fakeastro/src/airmass.c	(revision 39457)
@@ -4,4 +4,5 @@
 
 float airmass (float secz_image, double ra, double dec, double st, double latitude) {
+  OHANA_UNUSED_PARAM(secz_image);
 
   double hour, cosz, secz;
Index: trunk/Ohana/src/getstar/src/WriteImages.c
===================================================================
--- trunk/Ohana/src/getstar/src/WriteImages.c	(revision 39455)
+++ trunk/Ohana/src/getstar/src/WriteImages.c	(revision 39457)
@@ -3,4 +3,5 @@
 /* given image, find catalog images which overlap it */
 int WriteImages (char *filename, Image *images, off_t Nimages, off_t *matches, off_t Nmatches) {
+  OHANA_UNUSED_PARAM(Nimages);
   
   int i, N;
Index: trunk/Ohana/src/kapa2/include/buttons.h
===================================================================
--- trunk/Ohana/src/kapa2/include/buttons.h	(revision 39455)
+++ trunk/Ohana/src/kapa2/include/buttons.h	(revision 39457)
@@ -1,5 +1,5 @@
 #define PS_width 25
 #define PS_height 25
-static char PS_bits[] = {
+static unsigned char PS_bits[] = {
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x81, 0x3f, 0x00,
    0x82, 0x67, 0x60, 0x00, 0x02, 0x26, 0x40, 0x00, 0x02, 0x24, 0x40, 0x00,
@@ -13,5 +13,5 @@
 #define grey_width 25
 #define grey_height 25
-static char grey_bits[] = {
+static unsigned char grey_bits[] = {
    0x90, 0x40, 0xf7, 0x01, 0x04, 0xaa, 0xad, 0x01, 0x68, 0xd5, 0xfe, 0x01,
    0x82, 0x28, 0xdb, 0x01, 0x10, 0xd2, 0x75, 0x01, 0x40, 0xad, 0xee, 0x01,
@@ -25,5 +25,5 @@
 #define rainbow_width 25
 #define rainbow_height 25
-static char rainbow_bits[] = {
+static unsigned char rainbow_bits[] = {
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x80, 0xff, 0x00, 0x00, 0x70, 0x00, 0x01, 0x00, 0x0c, 0x7f, 0x00,
@@ -37,5 +37,5 @@
 #define recenter_width 25
 #define recenter_height 25
-static char recenter_bits[] = {
+static unsigned char recenter_bits[] = {
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00,
    0x80, 0xef, 0x03, 0x00, 0xe0, 0x00, 0x0e, 0x00, 0x30, 0x00, 0x18, 0x00,
@@ -49,5 +49,5 @@
 #define heat_width 25
 #define heat_height 25
-static char heat_bits[] = {
+static unsigned char heat_bits[] = {
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x07, 0xd8, 0x01,
    0x00, 0x0c, 0x37, 0x00, 0xf8, 0xc9, 0x6f, 0x00, 0x0c, 0xde, 0xf0, 0x00,
@@ -61,5 +61,5 @@
 #define red_width 25
 #define red_height 25
-static char red_bits[] = {
+static unsigned char red_bits[] = {
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0xfc, 0x03, 0x00,
    0x20, 0x07, 0x06, 0x00, 0xe0, 0x00, 0x0c, 0x00, 0x20, 0x00, 0x08, 0x00,
@@ -73,5 +73,5 @@
 #define green_width 25
 #define green_height 25
-static char green_bits[] = {
+static unsigned char green_bits[] = {
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x07, 0x00,
    0x00, 0x06, 0x04, 0x00, 0x80, 0x03, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00,
@@ -85,5 +85,5 @@
 #define blue_width 25
 #define blue_height 25
-static char blue_bits[] = {
+static unsigned char blue_bits[] = {
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xfe, 0x00, 0x00,
    0xc0, 0x83, 0x07, 0x00, 0xc0, 0x00, 0x0c, 0x00, 0x40, 0x00, 0x08, 0x00,
@@ -97,5 +97,5 @@
 #define yellow_width 25
 #define yellow_height 25
-static char yellow_bits[] = {
+static unsigned char yellow_bits[] = {
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x18, 0x00,
    0x80, 0x01, 0x0c, 0x00, 0x00, 0x03, 0x06, 0x00, 0x00, 0x02, 0x02, 0x00,
@@ -109,5 +109,5 @@
 #define flipx_width 25
 #define flipx_height 25
-static char flipx_bits[] = {
+static unsigned char flipx_bits[] = {
    0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x01, 0x00, 0x80, 0x10, 0x02, 0x00,
@@ -121,5 +121,5 @@
 #define flipy_width 25
 #define flipy_height 25
-static char flipy_bits[] = {
+static unsigned char flipy_bits[] = {
    0x00, 0x10, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00,
    0x00, 0x82, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x80, 0x00, 0x02, 0x00,
@@ -133,5 +133,5 @@
 #define hex_width 25
 #define hex_height 12
-static char hex_bits[] = {
+static unsigned char hex_bits[] = {
    0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
    0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0xf0, 0x00, 0x1e, 0x00, 0x88, 0x00,
Index: trunk/Ohana/src/kapa2/include/hms_buttons.h
===================================================================
--- trunk/Ohana/src/kapa2/include/hms_buttons.h	(revision 39455)
+++ trunk/Ohana/src/kapa2/include/hms_buttons.h	(revision 39457)
@@ -1,5 +1,5 @@
 #define hms_width 25
 #define hms_height 12
-static char hms_bits[] = {
+static unsigned char hms_bits[] = {
    0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
    0x02, 0x00, 0x00, 0x00, 0x02, 0x01, 0xf0, 0x00, 0x1e, 0xef, 0x89, 0x00,
@@ -8,5 +8,5 @@
 #define ddd_width 25
 #define ddd_height 12
-static char ddd_bits[] = {
+static unsigned char ddd_bits[] = {
    0x40, 0x80, 0x80, 0x00, 0x40, 0x80, 0x80, 0x00, 0x40, 0x80, 0x80, 0x00,
    0x40, 0x80, 0x80, 0x00, 0x40, 0x80, 0x80, 0x00, 0x5c, 0xb8, 0xb8, 0x00,
Index: trunk/Ohana/src/kapa2/include/prototypes.h
===================================================================
--- trunk/Ohana/src/kapa2/include/prototypes.h	(revision 39455)
+++ trunk/Ohana/src/kapa2/include/prototypes.h	(revision 39457)
@@ -172,9 +172,9 @@
 void          SetImageSize        PROTO((Section *section));
 
-void          InitButtonSize      PROTO((Button *button, int width, int height, char *bitmap));
+void          InitButtonSize      PROTO((Button *button, int width, int height, unsigned char *bitmap));
 void          InitButtonFunc      PROTO((Button *button, int (*function)(Graphic *graphic, KapaImageWidget *image)));
 void          DrawImage           PROTO((KapaImageWidget *image));
 void          DrawButton          PROTO((Graphic *graphic, Button *button));
-void          DrawBitmap          PROTO((Graphic *graphic, int x, int y, int dx, int dy, char *bitmap, int mode));
+void          DrawBitmap          PROTO((Graphic *graphic, int x, int y, int dx, int dy, unsigned char *bitmap, int mode));
 void          CrossHairs          PROTO((Graphic *graphic, Picture *image));
 void          hh_hms              PROTO((char *line, double ra, double dec, char sep, int Nchar));
Index: trunk/Ohana/src/kapa2/include/structures.h
===================================================================
--- trunk/Ohana/src/kapa2/include/structures.h	(revision 39455)
+++ trunk/Ohana/src/kapa2/include/structures.h	(revision 39457)
@@ -55,5 +55,5 @@
   int      x, y, dx, dy;      /* position and size */
   int      width, height;     /* size of the bitmap */
-  char    *bitmap;            /* picture on button */
+  unsigned char *bitmap;            /* picture on button */
   int    (*function_1) ();    /* mouse_button 1 function */
   int    (*function_2) ();    /* mouse_button 2 function */
Index: trunk/Ohana/src/kapa2/src/ButtonFunctions.c
===================================================================
--- trunk/Ohana/src/kapa2/src/ButtonFunctions.c	(revision 39455)
+++ trunk/Ohana/src/kapa2/src/ButtonFunctions.c	(revision 39457)
@@ -3,4 +3,6 @@
 
 int PSfunction (Graphic *graphic, KapaImageWidget *image) {
+  OHANA_UNUSED_PARAM(graphic);
+  OHANA_UNUSED_PARAM(image);
 
   int status;
@@ -11,4 +13,6 @@
 
 int PNGfunction (Graphic *graphic, KapaImageWidget *image) {
+  OHANA_UNUSED_PARAM(graphic);
+  OHANA_UNUSED_PARAM(image);
 
   int status;
@@ -19,4 +23,6 @@
 
 int JPEGfunction (Graphic *graphic, KapaImageWidget *image) {
+  OHANA_UNUSED_PARAM(graphic);
+  OHANA_UNUSED_PARAM(image);
 
   int status;
@@ -137,4 +143,5 @@
 /*********** overlay_button functions ************/
 int Overlay0 (Graphic *graphic, KapaImageWidget *image) {
+  OHANA_UNUSED_PARAM(graphic);
 
   image[0].overlay[0].active = image[0].overlay[0].active ^ TRUE;
@@ -145,4 +152,5 @@
 
 int Overlay1 (Graphic *graphic, KapaImageWidget *image) {
+  OHANA_UNUSED_PARAM(graphic);
 
   image[0].overlay[1].active = image[0].overlay[1].active ^ TRUE;
@@ -153,4 +161,5 @@
 
 int Overlay2 (Graphic *graphic, KapaImageWidget *image) {
+  OHANA_UNUSED_PARAM(graphic);
 
   image[0].overlay[2].active = image[0].overlay[2].active ^ TRUE;
@@ -161,4 +170,5 @@
 
 int Overlay3 (Graphic *graphic, KapaImageWidget *image) {
+  OHANA_UNUSED_PARAM(graphic);
 
   image[0].overlay[3].active = image[0].overlay[3].active ^ TRUE;
Index: trunk/Ohana/src/kapa2/src/DrawBitmap.c
===================================================================
--- trunk/Ohana/src/kapa2/src/DrawBitmap.c	(revision 39455)
+++ trunk/Ohana/src/kapa2/src/DrawBitmap.c	(revision 39457)
@@ -1,5 +1,5 @@
 # include "Ximage.h"
 
-void DrawBitmap (Graphic *graphic, int x, int y, int dx, int dy, char *bitmap, int mode) {
+void DrawBitmap (Graphic *graphic, int x, int y, int dx, int dy, unsigned char *bitmap, int mode) {
 
   int i, j, byte_line, byte, bit, flag;
Index: trunk/Ohana/src/kapa2/src/Image.c
===================================================================
--- trunk/Ohana/src/kapa2/src/Image.c	(revision 39455)
+++ trunk/Ohana/src/kapa2/src/Image.c	(revision 39457)
@@ -132,5 +132,5 @@
 }
 
-void InitButtonSize (Button *button, int width, int height, char *bitmap) {
+void InitButtonSize (Button *button, int width, int height, unsigned char *bitmap) {
   button->dx = width + 2;
   button->dy = height + 2;
Index: trunk/Ohana/src/kapa2/src/PNGit.c
===================================================================
--- trunk/Ohana/src/kapa2/src/PNGit.c	(revision 39455)
+++ trunk/Ohana/src/kapa2/src/PNGit.c	(revision 39457)
@@ -32,5 +32,5 @@
   }
 
-  png_ptr = png_create_write_struct (PNG_LIBPNG_VER_STRING, (png_voidp) NULL, (png_voidp) NULL, (png_voidp) NULL);
+  png_ptr = png_create_write_struct (PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
   if (!png_ptr) {
     fprintf (stderr, "can't get png structure\n");
@@ -42,5 +42,5 @@
   if (!info_ptr) {
     fprintf (stderr, "can't get png info structure\n");
-    png_destroy_write_struct (&png_ptr, (png_infopp) NULL);
+    png_destroy_write_struct (&png_ptr, NULL);
     fclose (f);
     return (TRUE);
Index: trunk/Ohana/src/kapa2/src/PaintOverlay.c
===================================================================
--- trunk/Ohana/src/kapa2/src/PaintOverlay.c	(revision 39455)
+++ trunk/Ohana/src/kapa2/src/PaintOverlay.c	(revision 39457)
@@ -34,5 +34,5 @@
     if (X - dX > Xmax) continue;
     if (Y + dY < Ymin) continue; 
-    if (Y - dY > Ymax);
+    if (Y - dY > Ymax) continue;
 
     pX = (image[0].picture.flipx) ? -1.0 : +1.0;
Index: trunk/Ohana/src/kapa2/src/Resize.c
===================================================================
--- trunk/Ohana/src/kapa2/src/Resize.c	(revision 39455)
+++ trunk/Ohana/src/kapa2/src/Resize.c	(revision 39457)
@@ -12,5 +12,5 @@
 
   // must scan the message before possible return
-  KiiScanMessage (sock, "%d %d", &NX, &NY);
+  KiiScanMessage (sock, "%u %u", &NX, &NY);
 
   // XXX keep this min limit (or modify for !USE_XWINDOW)?
@@ -42,4 +42,5 @@
 // resise the window so the image in the currently active window fills its section
 int ResizeByImage (int sock) {
+  OHANA_UNUSED_PARAM(sock);
  
   int i, Nsection;
Index: trunk/Ohana/src/kapa2/src/bDrawOverlay.c
===================================================================
--- trunk/Ohana/src/kapa2/src/bDrawOverlay.c	(revision 39455)
+++ trunk/Ohana/src/kapa2/src/bDrawOverlay.c	(revision 39457)
@@ -44,5 +44,5 @@
     if (X - dX > Xmax) continue;
     if (Y + dY < Ymin) continue; 
-    if (Y - dY > Ymax);
+    if (Y - dY > Ymax) continue;
 
     pX = (image[0].picture.flipx) ? -1.0 : +1.0;
Index: trunk/Ohana/src/libdvo/include/dvo_util.h
===================================================================
--- trunk/Ohana/src/libdvo/include/dvo_util.h	(revision 39455)
+++ trunk/Ohana/src/libdvo/include/dvo_util.h	(revision 39457)
@@ -61,5 +61,5 @@
 // There is no need to release memory pointed to by return value. 
 // It will be freed when dvoConfigFree() is invoked.
-Image *dvoImageByExternID(dvoConfig *dvoConfig, int sourceID, int externID);
+Image *dvoImageByExternID(dvoConfig *dvoConfig, unsigned short sourceID, unsigned int externID);
 
 // Loads the sky table for the database.
@@ -72,5 +72,5 @@
 // return a list of detections from a particular image id
 // Use dvoFree() to free the memory pointed to by results
-off_t dvoGetDetections(SkyList *skylist, int imageID, dvoDetection **results, int *pMaxDetID);
+off_t dvoGetDetections(SkyList *skylist, unsigned int imageID, dvoDetection **results, unsigned int *pMaxDetID);
 
 // free memory returned by various dvo util functions
Index: trunk/Ohana/src/libdvo/include/dvodb.h
===================================================================
--- trunk/Ohana/src/libdvo/include/dvodb.h	(revision 39455)
+++ trunk/Ohana/src/libdvo/include/dvodb.h	(revision 39457)
@@ -490,6 +490,6 @@
 double        TimeValue (time_t time, time_t TimeReference, int TimeFormat);
 
-void          image_subset          PROTO((Image *image, off_t Nimage, off_t **Subset, off_t *Nsubset, SkyRegionSelection *selection, unsigned long int tzero, double trange, int TimeSelect));
-off_t         match_image_subset    PROTO((Image *image, off_t *subset, off_t Nsubset, unsigned int T, short int S));
+void          image_subset          PROTO((Image *image, off_t Nimage, off_t **Subset, off_t *Nsubset, SkyRegionSelection *selection, e_time tzero, double trange, int TimeSelect));
+off_t         match_image_subset    PROTO((Image *image, off_t *subset, off_t Nsubset, e_time T, short int S));
 
 // dvo DB field functions
Index: trunk/Ohana/src/libdvo/include/libdvo_astro.h
===================================================================
--- trunk/Ohana/src/libdvo/include/libdvo_astro.h	(revision 39455)
+++ trunk/Ohana/src/libdvo/include/libdvo_astro.h	(revision 39457)
@@ -67,7 +67,7 @@
   int NMAP;
   AstromOffsetMap **map;
-   int *imageIDtoTableSeq;
-  int MaxImageID;
-  int MaxTableID;
+  int *imageIDtoTableSeq;
+  unsigned int MaxImageID;
+  unsigned int MaxTableID;
 } AstromOffsetTable;
 
Index: trunk/Ohana/src/libdvo/src/AstromOffsetMapIO.c
===================================================================
--- trunk/Ohana/src/libdvo/src/AstromOffsetMapIO.c	(revision 39455)
+++ trunk/Ohana/src/libdvo/src/AstromOffsetMapIO.c	(revision 39457)
@@ -77,5 +77,6 @@
     }
     AstromOffsetTableSetIDs (table);
-    gfits_free_header (ftable.header);
+
+    gfits_free_header (&theader);
     gfits_free_table  (&ftable);
   } else {
@@ -98,9 +99,12 @@
     // Convert the disk array of maps to then internal format in a rich structure:
     table = AstromOffsetMapToTable (map_disk, Nmap);
+
+    gfits_free_header (&theader);
     gfits_free_table  (&ftable);
   }
 
-  gfits_free_header (&theader);
+  gfits_free_header (&header);
   gfits_free_matrix (&matrix);
+  fclose (f);
 
   return (table);
@@ -130,4 +134,5 @@
   ftable.header = &theader;
   gfits_table_set_AstromOffsetMap_Disk_6x6 (&ftable, map_disk, Nmap, TRUE);
+  FREE (map_disk);
 
   f = fopen (filename, "w");
@@ -143,4 +148,9 @@
   fclose (f);
 
+  gfits_free_header (&header);
+  gfits_free_matrix (&matrix);
+  gfits_free_header (&theader);
+  gfits_free_table  (&ftable);
+
   return (TRUE);
 }
@@ -148,5 +158,6 @@
 AstromOffsetTable *AstromOffsetMapToTable(AstromOffsetMap_Disk_6x6 *map_disk, off_t Nmap) {
 
-  int i, j, k;
+  unsigned int i;
+  int j, k;
 
   AstromOffsetTable *table = NULL;
@@ -157,9 +168,9 @@
 
   // find the max value of imageID
-  int MaxTableID = 0;
-  int MaxImageID = 0;
+  unsigned int MaxTableID = 0;
+  unsigned int MaxImageID = 0;
   for (i = 0; i < Nmap; i++) {
-    MaxTableID = MAX(map_disk[i].tableID, MaxTableID);
-    MaxImageID = MAX(map_disk[i].imageID, MaxImageID);
+    MaxTableID = MAX(MaxTableID, map_disk[i].tableID);
+    MaxImageID = MAX(MaxImageID, map_disk[i].imageID);
   }
   table->MaxTableID = MaxTableID;
@@ -312,27 +323,34 @@
 int AstromOffsetTableSetIDs (AstromOffsetTable *table) {
 
-  int i;
-
   // find the max value of imageID
-  int MaxTableID = 0;
-  int MaxImageID = 0;
-  for (i = 0; i < table->Nmap; i++) {
-    MaxTableID = MAX(table->map[i][0].tableID, MaxTableID);
-    MaxImageID = MAX(table->map[i][0].imageID, MaxImageID);
-  }
-  table->MaxTableID = MaxTableID;
-  table->MaxImageID = MaxImageID;
+  unsigned int MaxTableID = 0;
+  unsigned int MaxImageID = 0;
+  {
+    int j;
+    for (j = 0; j < table->Nmap; j++) {
+      MaxTableID = MAX(MaxTableID, table->map[j][0].tableID);
+      MaxImageID = MAX(MaxImageID, table->map[j][0].imageID);
+    }
+    table->MaxTableID = MaxTableID;
+    table->MaxImageID = MaxImageID;
+  }
 
   // generate the index and init values to -1
-  ALLOCATE (table->imageIDtoTableSeq, int, MaxImageID + 1);
-  for (i = 0; i <= MaxImageID; i++) {
-    table->imageIDtoTableSeq[i] = -1;
+  {
+    unsigned int i;
+    ALLOCATE (table->imageIDtoTableSeq, int, MaxImageID + 1);
+    for (i = 0; i <= MaxImageID; i++) {
+      table->imageIDtoTableSeq[i] = -1;
+    }
   }
 
   // assign the ID values
-  for (i = 0; i < table->Nmap; i++) {
-    int ImageID = table->map[i][0].imageID;
-    myAssert (table->imageIDtoTableSeq[ImageID] == -1, "oops, duplicate image IDs");
-    table->imageIDtoTableSeq[ImageID] = i;
+  { 
+    int j;
+    for (j = 0; j < table->Nmap; j++) {
+      int ImageID = table->map[j][0].imageID;
+      myAssert (table->imageIDtoTableSeq[ImageID] == -1, "oops, duplicate image IDs");
+      table->imageIDtoTableSeq[ImageID] = j;
+    }
   }
   return TRUE;
Index: trunk/Ohana/src/libdvo/src/AstromOffsetMapUtils.c
===================================================================
--- trunk/Ohana/src/libdvo/src/AstromOffsetMapUtils.c	(revision 39455)
+++ trunk/Ohana/src/libdvo/src/AstromOffsetMapUtils.c	(revision 39457)
@@ -11,6 +11,7 @@
   off_t i;
   for (i = 0; i < Nimages; i++) {
-    int imageID = images[i].imageID;
-    if (imageID < 0) continue;
+    // if (images[i].imageID < 0) continue;
+
+    unsigned int imageID = images[i].imageID;
     if (imageID > table->MaxImageID) continue;
     
@@ -126,6 +127,6 @@
   tgt->keep = src->keep; 
 
-  int Nx = src->dX;
-  int Ny = src->dY;
+  int Nx = src->Nx;
+  int Ny = src->Ny;
 
   int j, k;
Index: trunk/Ohana/src/libdvo/src/HostTable.c
===================================================================
--- trunk/Ohana/src/libdvo/src/HostTable.c	(revision 39455)
+++ trunk/Ohana/src/libdvo/src/HostTable.c	(revision 39457)
@@ -27,6 +27,7 @@
   int i;
   for (i = 0; i < Nhosts; i++) {
-    free (hosts[i].hostname);
-    free (hosts[i].pathname);
+    FREE (hosts[i].hostname);
+    FREE (hosts[i].pathname);
+    FREE (hosts[i].results);
     FreeIOBuffer (&hosts[i].stdout);
     FreeIOBuffer (&hosts[i].stderr);
@@ -43,4 +44,5 @@
   }
   if (table->index) free (table->index);
+
   free (table);
   return;
Index: trunk/Ohana/src/libdvo/src/ImageOps.c
===================================================================
--- trunk/Ohana/src/libdvo/src/ImageOps.c	(revision 39455)
+++ trunk/Ohana/src/libdvo/src/ImageOps.c	(revision 39457)
@@ -5,5 +5,5 @@
 void image_subset (Image *image, off_t Nimage, off_t **Subset, off_t *Nsubset,
 		   SkyRegionSelection *selection, 
-		   unsigned long int tzero, double trange, int TimeSelect) 
+		   e_time tzero, double trange, int TimeSelect) 
 {
 
Index: trunk/Ohana/src/libdvo/src/RegionHostTable.c
===================================================================
--- trunk/Ohana/src/libdvo/src/RegionHostTable.c	(revision 39455)
+++ trunk/Ohana/src/libdvo/src/RegionHostTable.c	(revision 39457)
@@ -42,4 +42,18 @@
   for (i = 0; i < Nhosts; i++) {
     free (hosts[i].hostname);
+    FreeIOBuffer (&hosts[i].stdout);
+    FreeIOBuffer (&hosts[i].stderr);
+    FREE (hosts[i].image);
+    FREE (hosts[i].imseq);
+    FREE (hosts[i].neighbors);
+    if (hosts[i].astromTable) {
+      FREE (hosts[i].astromTable->map);
+      FREE (hosts[i].astromTable->imageIDtoTableSeq);
+      FREE (hosts[i].astromTable);
+    }
+    // do NOT use AstromOffsetTableFree : an astromTable is
+    // only set here by relastro:assign_images, and it uses
+    // AstromOffsetTableAddMapFromImage to assign pointers, not copies
+    // AstromOffsetTableFree(hosts[i].astromTable);
   }
   free (hosts);
@@ -55,4 +69,5 @@
   if (table->index) free (table->index);
   free (table);
+
   return;
 }
@@ -83,5 +98,5 @@
   RegionHostInfo *hosts = NULL;
   ALLOCATE (hosts, RegionHostInfo, NHOSTS);
-  InitRegionHosts (hosts, Nhosts, NHOSTS);
+  InitRegionHosts (hosts, 0, NHOSTS);
 
   int maxID = 0;
Index: trunk/Ohana/src/libdvo/src/dbExtractImages.c
===================================================================
--- trunk/Ohana/src/libdvo/src/dbExtractImages.c	(revision 39455)
+++ trunk/Ohana/src/libdvo/src/dbExtractImages.c	(revision 39457)
@@ -55,4 +55,5 @@
 /* return image.field based on the selection */
 dbValue dbExtractImages (Image *image, off_t Nimage, off_t N, dbField *field) {
+  OHANA_UNUSED_PARAM(Nimage); // XXX: not sure why this is supplied
 
   double x, y;
Index: trunk/Ohana/src/libdvo/src/db_utils.c
===================================================================
--- trunk/Ohana/src/libdvo/src/db_utils.c	(revision 39455)
+++ trunk/Ohana/src/libdvo/src/db_utils.c	(revision 39457)
@@ -10,4 +10,7 @@
 // by default, no graphdata 
 int GetGraphdata(Graphdata *graph, int *kapa, char *name) {
+  OHANA_UNUSED_PARAM(graph);
+  OHANA_UNUSED_PARAM(kapa);
+  OHANA_UNUSED_PARAM(name);
     return FALSE;
 }
Index: trunk/Ohana/src/libdvo/src/dvo_catalog_chipcoords.c
===================================================================
--- trunk/Ohana/src/libdvo/src/dvo_catalog_chipcoords.c	(revision 39455)
+++ trunk/Ohana/src/libdvo/src/dvo_catalog_chipcoords.c	(revision 39457)
@@ -1,5 +1,5 @@
 # include <dvo.h>
 
-int dvo_match_image (Image *image, int Nimage, unsigned int T, short int S) {
+int dvo_match_image (Image *image, int Nimage, int T, short int S) {
 
   int N, Nlo, Nhi, N1, N2;
Index: trunk/Ohana/src/libdvo/src/dvo_catalog_mef.c
===================================================================
--- trunk/Ohana/src/libdvo/src/dvo_catalog_mef.c	(revision 39455)
+++ trunk/Ohana/src/libdvo/src/dvo_catalog_mef.c	(revision 39457)
@@ -17,9 +17,9 @@
      it is not defined for a legacy database, we can generate them using the existing index values.
      If it is missing, give a warning and recommend the user upgrade the DB */
-  if (!gfits_scan (&catalog[0].header, "OBJID",    "%d", 1, &catalog[0].objID)) {
+  if (!gfits_scan (&catalog[0].header, "OBJID",    "%u", 1, &catalog[0].objID)) {
     if (VERBOSE) fprintf (stderr, "WARNING: OBJID is not set for %s: upgrade for full feature set\n", catalog[0].filename);
     catalog[0].objID = 0;
   }
-  if (!gfits_scan (&catalog[0].header, "CATID",    "%d", 1, &catalog[0].catID)) {
+  if (!gfits_scan (&catalog[0].header, "CATID",    "%u", 1, &catalog[0].catID)) {
     if (VERBOSE) fprintf (stderr, "WARNING: CATID is not set for %s: upgrade for full feature set\n", catalog[0].filename);
     catalog[0].catID = 0;
Index: trunk/Ohana/src/libdvo/src/dvo_catalog_raw.c
===================================================================
--- trunk/Ohana/src/libdvo/src/dvo_catalog_raw.c	(revision 39455)
+++ trunk/Ohana/src/libdvo/src/dvo_catalog_raw.c	(revision 39457)
@@ -29,9 +29,9 @@
      it is not defined for a legacy database, we can generate them using the existing index values.
      If it is missing, give a warning and recommend the user upgrade the DB */
-  if (!gfits_scan (&catalog[0].header, "OBJID",    "%d", 1, &catalog[0].objID)) {
+  if (!gfits_scan (&catalog[0].header, "OBJID",    "%u", 1, &catalog[0].objID)) {
     if (VERBOSE) fprintf (stderr, "WARNING: OBJID is not set for this database: upgrade for full feature set\n");
     catalog[0].objID = 0;
   }
-  if (!gfits_scan (&catalog[0].header, "CATID",    "%d", 1, &catalog[0].catID)) {
+  if (!gfits_scan (&catalog[0].header, "CATID",    "%u", 1, &catalog[0].catID)) {
     if (VERBOSE) fprintf (stderr, "WARNING: CATID is not set for this database: upgrade for full feature set\n");
     catalog[0].catID = 0;
Index: trunk/Ohana/src/libdvo/src/dvo_convert.c
===================================================================
--- trunk/Ohana/src/libdvo/src/dvo_convert.c	(revision 39455)
+++ trunk/Ohana/src/libdvo/src/dvo_convert.c	(revision 39457)
@@ -320,4 +320,5 @@
 
 Missing *FtableToMissing (FTable *ftable, Average *average, off_t *Nmissing, DVOCatFormat *format, char nativeBytes) {
+  OHANA_UNUSED_PARAM(average);
 
   Missing *missing;
@@ -397,4 +398,5 @@
 
 SecFilt *FtableToSecFilt (FTable *ftable, Average *average, off_t *Nsecfilt, DVOCatFormat *format, char nativeBytes) {
+  OHANA_UNUSED_PARAM(average);
 
   SecFilt *secfilt;
@@ -509,4 +511,5 @@
 
 Lensing *FtableToLensing (FTable *ftable, Average *average, off_t *Nlensing, DVOCatFormat *format, char nativeBytes) {
+  OHANA_UNUSED_PARAM(average);
 
   Lensing *lensing;
@@ -652,4 +655,5 @@
 
 Lensobj *FtableToLensobj (FTable *ftable, Average *average, off_t *Nlensobj, DVOCatFormat *format, char nativeBytes) {
+  OHANA_UNUSED_PARAM(average);
 
   Lensobj *lensobj;
@@ -769,4 +773,5 @@
 
 StarPar *FtableToStarPar (FTable *ftable, Average *average, off_t *Nstarpar, DVOCatFormat *format, char nativeBytes) {
+  OHANA_UNUSED_PARAM(average);
 
   StarPar *starpar;
@@ -874,4 +879,5 @@
 
 GalPhot *FtableToGalPhot (FTable *ftable, Average *average, off_t *Ngalphot, DVOCatFormat *format, char nativeBytes) {
+  OHANA_UNUSED_PARAM(average);
 
   GalPhot *galphot;
Index: trunk/Ohana/src/libdvo/src/dvo_convert_PS1_DEV_1.c
===================================================================
--- trunk/Ohana/src/libdvo/src/dvo_convert_PS1_DEV_1.c	(revision 39455)
+++ trunk/Ohana/src/libdvo/src/dvo_convert_PS1_DEV_1.c	(revision 39457)
@@ -100,4 +100,5 @@
 // 'primary' is needed to conform with the API for Loneos and Elixir, but is not used
 Average *Average_PS1_DEV_1_ToInternal (Average_PS1_DEV_1 *in, off_t Nvalues, SecFilt **primary) {
+  OHANA_UNUSED_PARAM(primary);
 
   off_t i;
@@ -138,4 +139,5 @@
 // 'primary' is needed to conform with the API for Loneos and Elixir, but is not used
 Average_PS1_DEV_1 *AverageInternalTo_PS1_DEV_1 (Average *in, off_t Nvalues, SecFilt *primary) {
+  OHANA_UNUSED_PARAM(primary);
 
   off_t i;
Index: trunk/Ohana/src/libdvo/src/dvo_convert_PS1_DEV_2.c
===================================================================
--- trunk/Ohana/src/libdvo/src/dvo_convert_PS1_DEV_2.c	(revision 39455)
+++ trunk/Ohana/src/libdvo/src/dvo_convert_PS1_DEV_2.c	(revision 39457)
@@ -97,4 +97,5 @@
 // 'primary' is needed to conform with the API for Loneos and Elixir, but is not used
 Average *Average_PS1_DEV_2_ToInternal (Average_PS1_DEV_2 *in, off_t Nvalues, SecFilt **primary) {
+  OHANA_UNUSED_PARAM(primary);
 
   off_t i;
@@ -133,4 +134,5 @@
 // 'primary' is needed to conform with the API for Loneos and Elixir, but is not used
 Average_PS1_DEV_2 *AverageInternalTo_PS1_DEV_2 (Average *in, off_t Nvalues, SecFilt *primary) {
+  OHANA_UNUSED_PARAM(primary);
 
   off_t i;
Index: trunk/Ohana/src/libdvo/src/dvo_convert_PS1_REF.c
===================================================================
--- trunk/Ohana/src/libdvo/src/dvo_convert_PS1_REF.c	(revision 39455)
+++ trunk/Ohana/src/libdvo/src/dvo_convert_PS1_REF.c	(revision 39457)
@@ -55,4 +55,5 @@
 // 'primary' is needed to conform with the API for Loneos and Elixir, but is not used
 Average *Average_PS1_REF_ToInternal (Average_PS1_REF *in, off_t Nvalues, SecFilt **primary) {
+  OHANA_UNUSED_PARAM(primary);
 
   off_t i;
@@ -80,4 +81,5 @@
 // 'primary' is needed to conform with the API for Loneos and Elixir, but is not used
 Average_PS1_REF *AverageInternalTo_PS1_REF (Average *in, off_t Nvalues, SecFilt *primary) {
+  OHANA_UNUSED_PARAM(primary);
 
   off_t i;
Index: trunk/Ohana/src/libdvo/src/dvo_convert_PS1_SIM.c
===================================================================
--- trunk/Ohana/src/libdvo/src/dvo_convert_PS1_SIM.c	(revision 39455)
+++ trunk/Ohana/src/libdvo/src/dvo_convert_PS1_SIM.c	(revision 39457)
@@ -4,4 +4,5 @@
 
 Measure *Measure_PS1_SIM_ToInternal (Average *ave, Measure_PS1_SIM *in, off_t Nvalues) {
+  OHANA_UNUSED_PARAM(ave);
 
   off_t i;
@@ -51,4 +52,5 @@
 
 Measure_PS1_SIM *MeasureInternalTo_PS1_SIM (Average *ave, Measure *in, off_t Nvalues) {
+  OHANA_UNUSED_PARAM(ave);
 
   off_t i;
@@ -97,4 +99,5 @@
 // 'primary' is needed to conform with the API for Loneos and Elixir, but is not used
 Average *Average_PS1_SIM_ToInternal (Average_PS1_SIM *in, off_t Nvalues, SecFilt **primary) {
+  OHANA_UNUSED_PARAM(primary);
 
   off_t i;
@@ -143,4 +146,5 @@
 // 'primary' is needed to conform with the API for Loneos and Elixir, but is not used
 Average_PS1_SIM *AverageInternalTo_PS1_SIM (Average *in, off_t Nvalues, SecFilt *primary) {
+  OHANA_UNUSED_PARAM(primary);
 
   off_t i;
Index: trunk/Ohana/src/libdvo/src/dvo_convert_PS1_V1.c
===================================================================
--- trunk/Ohana/src/libdvo/src/dvo_convert_PS1_V1.c	(revision 39455)
+++ trunk/Ohana/src/libdvo/src/dvo_convert_PS1_V1.c	(revision 39457)
@@ -115,4 +115,5 @@
 // 'primary' is needed to conform with the API for Loneos and Elixir, but is not used
 Average *Average_PS1_V1_ToInternal (Average_PS1_V1 *in, off_t Nvalues, SecFilt **primary) {
+  OHANA_UNUSED_PARAM(primary);
 
   off_t i;
@@ -152,4 +153,5 @@
 // 'primary' is needed to conform with the API for Loneos and Elixir, but is not used
 Average_PS1_V1 *AverageInternalTo_PS1_V1 (Average *in, off_t Nvalues, SecFilt *primary) {
+  OHANA_UNUSED_PARAM(primary);
 
   off_t i;
Index: trunk/Ohana/src/libdvo/src/dvo_convert_PS1_V2.c
===================================================================
--- trunk/Ohana/src/libdvo/src/dvo_convert_PS1_V2.c	(revision 39455)
+++ trunk/Ohana/src/libdvo/src/dvo_convert_PS1_V2.c	(revision 39457)
@@ -116,4 +116,5 @@
 // 'primary' is needed to conform with the API for Loneos and Elixir, but is not used
 Average *Average_PS1_V2_ToInternal (Average_PS1_V2 *in, off_t Nvalues, SecFilt **primary) {
+  OHANA_UNUSED_PARAM(primary);
 
   off_t i;
@@ -157,4 +158,5 @@
 // 'primary' is needed to conform with the API for Loneos and Elixir, but is not used
 Average_PS1_V2 *AverageInternalTo_PS1_V2 (Average *in, off_t Nvalues, SecFilt *primary) {
+  OHANA_UNUSED_PARAM(primary);
 
   off_t i;
Index: trunk/Ohana/src/libdvo/src/dvo_convert_PS1_V3.c
===================================================================
--- trunk/Ohana/src/libdvo/src/dvo_convert_PS1_V3.c	(revision 39455)
+++ trunk/Ohana/src/libdvo/src/dvo_convert_PS1_V3.c	(revision 39457)
@@ -116,4 +116,5 @@
 // 'primary' is needed to conform with the API for Loneos and Elixir, but is not used
 Average *Average_PS1_V3_ToInternal (Average_PS1_V3 *in, off_t Nvalues, SecFilt **primary) {
+  OHANA_UNUSED_PARAM(primary);
 
   off_t i;
@@ -159,4 +160,5 @@
 // 'primary' is needed to conform with the API for Loneos and Elixir, but is not used
 Average_PS1_V3 *AverageInternalTo_PS1_V3 (Average *in, off_t Nvalues, SecFilt *primary) {
+  OHANA_UNUSED_PARAM(primary);
 
   off_t i;
Index: trunk/Ohana/src/libdvo/src/dvo_convert_PS1_V4.c
===================================================================
--- trunk/Ohana/src/libdvo/src/dvo_convert_PS1_V4.c	(revision 39455)
+++ trunk/Ohana/src/libdvo/src/dvo_convert_PS1_V4.c	(revision 39457)
@@ -134,4 +134,5 @@
 // 'primary' is needed to conform with the API for Loneos and Elixir, but is not used
 Average *Average_PS1_V4_ToInternal (Average_PS1_V4 *in, off_t Nvalues, SecFilt **primary) {
+  OHANA_UNUSED_PARAM(primary);
 
   off_t i;
@@ -180,4 +181,5 @@
 // 'primary' is needed to conform with the API for Loneos and Elixir, but is not used
 Average_PS1_V4 *AverageInternalTo_PS1_V4 (Average *in, off_t Nvalues, SecFilt *primary) {
+  OHANA_UNUSED_PARAM(primary);
 
   off_t i;
Index: trunk/Ohana/src/libdvo/src/dvo_convert_PS1_V5.c
===================================================================
--- trunk/Ohana/src/libdvo/src/dvo_convert_PS1_V5.c	(revision 39455)
+++ trunk/Ohana/src/libdvo/src/dvo_convert_PS1_V5.c	(revision 39457)
@@ -4,4 +4,5 @@
 
 Measure *Measure_PS1_V5_ToInternal (Average *ave, Measure_PS1_V5 *in, off_t Nvalues) {
+  OHANA_UNUSED_PARAM(ave);
 
   off_t i;
@@ -79,4 +80,5 @@
 
 Measure_PS1_V5 *MeasureInternalTo_PS1_V5 (Average *ave, Measure *in, off_t Nvalues) {
+  OHANA_UNUSED_PARAM(ave);
 
   off_t i;
@@ -153,4 +155,5 @@
 // 'primary' is needed to conform with the API for Loneos and Elixir, but is not used
 Average *Average_PS1_V5_ToInternal (Average_PS1_V5 *in, off_t Nvalues, SecFilt **primary) {
+  OHANA_UNUSED_PARAM(primary);
 
   off_t i;
@@ -225,4 +228,5 @@
 // 'primary' is needed to conform with the API for Loneos and Elixir, but is not used
 Average_PS1_V5 *AverageInternalTo_PS1_V5 (Average *in, off_t Nvalues, SecFilt *primary) {
+  OHANA_UNUSED_PARAM(primary);
 
   off_t i;
@@ -1640,4 +1644,5 @@
 
 Measure *Measure_PS1_V5alt_ToInternal (Average *ave, Measure_PS1_V5alt *in, off_t Nvalues) {
+  OHANA_UNUSED_PARAM(ave);
 
   off_t i;
Index: trunk/Ohana/src/libdvo/src/dvo_convert_panstarrs_DEV_0.c
===================================================================
--- trunk/Ohana/src/libdvo/src/dvo_convert_panstarrs_DEV_0.c	(revision 39455)
+++ trunk/Ohana/src/libdvo/src/dvo_convert_panstarrs_DEV_0.c	(revision 39457)
@@ -106,4 +106,5 @@
 // 'primary is needed to conform with the API for Loneos and Elixir, but is not used
 Average *Average_Panstarrs_DEV_0_ToInternal (Average_Panstarrs_DEV_0 *in, off_t Nvalues, SecFilt **primary) {
+  OHANA_UNUSED_PARAM(primary);
 
   off_t i;
@@ -143,4 +144,5 @@
 // 'primary is needed to conform with the API for Loneos and Elixir, but is not used
 Average_Panstarrs_DEV_0 *AverageInternalTo_Panstarrs_DEV_0 (Average *in, off_t Nvalues, SecFilt *primary) {
+  OHANA_UNUSED_PARAM(primary);
 
   off_t i;
Index: trunk/Ohana/src/libdvo/src/dvo_convert_panstarrs_DEV_1.c
===================================================================
--- trunk/Ohana/src/libdvo/src/dvo_convert_panstarrs_DEV_1.c	(revision 39455)
+++ trunk/Ohana/src/libdvo/src/dvo_convert_panstarrs_DEV_1.c	(revision 39457)
@@ -106,4 +106,5 @@
 // 'primary is needed to conform with the API for Loneos and Elixir, but is not used
 Average *Average_Panstarrs_DEV_1_ToInternal (Average_Panstarrs_DEV_1 *in, off_t Nvalues, SecFilt **primary) {
+  OHANA_UNUSED_PARAM(primary);
 
   off_t i;
@@ -143,4 +144,5 @@
 // 'primary is needed to conform with the API for Loneos and Elixir, but is not used
 Average_Panstarrs_DEV_1 *AverageInternalTo_Panstarrs_DEV_1 (Average *in, off_t Nvalues, SecFilt *primary) {
+  OHANA_UNUSED_PARAM(primary);
 
   off_t i;
Index: trunk/Ohana/src/libdvo/src/dvo_photcode_ops.c
===================================================================
--- trunk/Ohana/src/libdvo/src/dvo_photcode_ops.c	(revision 39455)
+++ trunk/Ohana/src/libdvo/src/dvo_photcode_ops.c	(revision 39457)
@@ -467,4 +467,5 @@
 /***/
 float PhotAve (PhotCode *code, Average *average, SecFilt *secfilt, dvoMagClassType class, dvoMagSourceType source) {
+  OHANA_UNUSED_PARAM(average);
 
   if (code == NULL) return NAN;
@@ -572,4 +573,5 @@
 
 float PhotCalErr (Measure *measure, dvoMagClassType class) {
+  OHANA_UNUSED_PARAM(class);
 
   float dMcal = measure[0].dMcal;
@@ -578,4 +580,5 @@
 
 float PhotAveErr (PhotCode *code, Average *average, SecFilt *secfilt, dvoMagClassType class, dvoMagSourceType source) {
+  OHANA_UNUSED_PARAM(average);
 
   if (code == NULL) return NAN;
@@ -640,4 +643,6 @@
 
 float PhotZeroPoint (Measure *measure, Average *average, SecFilt *secfilt) {
+  OHANA_UNUSED_PARAM(average);
+  OHANA_UNUSED_PARAM(secfilt);
 
   int Np;
@@ -710,4 +715,5 @@
 
 float PhotMstdev (PhotCode *code, Average *average, SecFilt *secfilt, dvoMagClassType class, dvoMagSourceType source) {
+  OHANA_UNUSED_PARAM(average);
 
   if (code == NULL) return NAN;
@@ -757,4 +763,5 @@
 // return the number of detections in this filter (gpc1)
 int PhotNcode (PhotCode *code, Average *average, SecFilt *secfilt) {
+  OHANA_UNUSED_PARAM(average);
 
   if (code == NULL) return 0;
@@ -768,4 +775,5 @@
 // return the number of detections in this filter (gpc1)
 int PhotSecfiltFlags (PhotCode *code, Average *average, SecFilt *secfilt) {
+  OHANA_UNUSED_PARAM(average);
 
   if (code == NULL) return 0;
@@ -778,4 +786,5 @@
 
 int PhotNphot (PhotCode *code, Average *average, SecFilt *secfilt, dvoMagClassType class, dvoMagSourceType source) {
+  OHANA_UNUSED_PARAM(average);
 
   if (code == NULL) return 0;
@@ -824,4 +833,5 @@
 
 float PhotAveFluxPSF (PhotCode *code, Average *average, SecFilt *secfilt) {
+  OHANA_UNUSED_PARAM(average);
 
   int Ns;
@@ -836,4 +846,5 @@
 
 float PhotAvedFluxPSF (PhotCode *code, Average *average, SecFilt *secfilt) {
+  OHANA_UNUSED_PARAM(average);
 
   int Ns;
@@ -848,4 +859,5 @@
 
 float PhotAveFluxKron (PhotCode *code, Average *average, SecFilt *secfilt) {
+  OHANA_UNUSED_PARAM(average);
 
   int Ns;
@@ -860,4 +872,5 @@
 
 float PhotAvedFluxKron (PhotCode *code, Average *average, SecFilt *secfilt) {
+  OHANA_UNUSED_PARAM(average);
 
   int Ns;
@@ -872,4 +885,5 @@
 
 float PhotMmin (PhotCode *code, Average *average, SecFilt *secfilt) {
+  OHANA_UNUSED_PARAM(average);
 
   int Ns;
@@ -884,4 +898,5 @@
 
 float PhotMmax (PhotCode *code, Average *average, SecFilt *secfilt) {
+  OHANA_UNUSED_PARAM(average);
 
   int Ns;
@@ -896,4 +911,5 @@
 
 float PhotUCdist (PhotCode *code, Average *average, SecFilt *secfilt) {
+  OHANA_UNUSED_PARAM(average);
 
   int Ns;
@@ -921,4 +937,5 @@
 // Xm is now (2014.07.03) stored as the chisq except in dvo formats which use as short
 float PhotXm (PhotCode *code, Average *average, SecFilt *secfilt) {
+  OHANA_UNUSED_PARAM(average);
 
   int Ns;
@@ -1188,4 +1205,5 @@
 /***/
 float PhotFluxAve (PhotCode *code, Average *average, SecFilt *secfilt, dvoMagClassType class, dvoMagSourceType source) {
+  OHANA_UNUSED_PARAM(average);
 
   if (code == NULL) return NAN;
@@ -1248,4 +1266,5 @@
 
 float PhotFluxAveErr (PhotCode *code, Average *average, SecFilt *secfilt, dvoMagClassType class, dvoMagSourceType source) {
+  OHANA_UNUSED_PARAM(average);
 
   if (code == NULL) return NAN;
@@ -1610,4 +1629,5 @@
 /***/
 float PhotAveTiny (PhotCode *code, AverageTiny *average, SecFilt *secfilt, dvoMagClassType class, dvoMagSourceType source) {
+  OHANA_UNUSED_PARAM(average);
 
   if (code == NULL) return NAN;
@@ -1746,4 +1766,5 @@
 
 float PhotdMTiny (PhotCode *code, AverageTiny *average, SecFilt *secfilt) {
+  OHANA_UNUSED_PARAM(average);
 
   int Ns;
@@ -1759,4 +1780,5 @@
 // Xm is now (2014.07.03) stored as the chisq except in dvo formats which use as short
 float PhotXmTiny (PhotCode *code, AverageTiny *average, SecFilt *secfilt) {
+  OHANA_UNUSED_PARAM(average);
 
   int Ns;
@@ -1853,45 +1875,45 @@
 }
 
-LENSFIELD(X11_sm_obj);
-LENSFIELD(X12_sm_obj);
-LENSFIELD(X22_sm_obj);
-LENSFIELD(E1_sm_obj);
-LENSFIELD(E2_sm_obj);
-
-LENSFIELD(X11_sh_obj);
-LENSFIELD(X12_sh_obj);
-LENSFIELD(X22_sh_obj);
-LENSFIELD(E1_sh_obj);
-LENSFIELD(E2_sh_obj);
-
-LENSFIELD(X11_sm_psf);
-LENSFIELD(X12_sm_psf);
-LENSFIELD(X22_sm_psf);
-LENSFIELD(E1_sm_psf);
-LENSFIELD(E2_sm_psf);
-
-LENSFIELD(X11_sh_psf);
-LENSFIELD(X12_sh_psf);
-LENSFIELD(X22_sh_psf);
-LENSFIELD(E1_sh_psf);
-LENSFIELD(E2_sh_psf);
-
-LENSFIELD( F_ApR5);
-LENSFIELD(dF_ApR5);
-LENSFIELD(sF_ApR5);
-LENSFIELD(fF_ApR5);
-
-LENSFIELD( F_ApR6);
-LENSFIELD(dF_ApR6);
-LENSFIELD(sF_ApR6);
-LENSFIELD(fF_ApR6);
-
-LENSFIELD( F_ApR7);
-LENSFIELD(dF_ApR7);
-LENSFIELD(sF_ApR7);
-LENSFIELD(fF_ApR7);
-
-LENSFIELD(E1);
-LENSFIELD(E2);
+LENSFIELD(X11_sm_obj)
+LENSFIELD(X12_sm_obj)
+LENSFIELD(X22_sm_obj)
+LENSFIELD(E1_sm_obj)
+LENSFIELD(E2_sm_obj)
+
+LENSFIELD(X11_sh_obj)
+LENSFIELD(X12_sh_obj)
+LENSFIELD(X22_sh_obj)
+LENSFIELD(E1_sh_obj)
+LENSFIELD(E2_sh_obj)
+
+LENSFIELD(X11_sm_psf)
+LENSFIELD(X12_sm_psf)
+LENSFIELD(X22_sm_psf)
+LENSFIELD(E1_sm_psf)
+LENSFIELD(E2_sm_psf)
+
+LENSFIELD(X11_sh_psf)
+LENSFIELD(X12_sh_psf)
+LENSFIELD(X22_sh_psf)
+LENSFIELD(E1_sh_psf)
+LENSFIELD(E2_sh_psf)
+
+LENSFIELD( F_ApR5)
+LENSFIELD(dF_ApR5)
+LENSFIELD(sF_ApR5)
+LENSFIELD(fF_ApR5)
+
+LENSFIELD( F_ApR6)
+LENSFIELD(dF_ApR6)
+LENSFIELD(sF_ApR6)
+LENSFIELD(fF_ApR6)
+
+LENSFIELD( F_ApR7)
+LENSFIELD(dF_ApR7)
+LENSFIELD(sF_ApR7)
+LENSFIELD(fF_ApR7)
+
+LENSFIELD(E1)
+LENSFIELD(E2)
 
 # if (1)
Index: trunk/Ohana/src/libdvo/src/dvo_tiny_values.c
===================================================================
--- trunk/Ohana/src/libdvo/src/dvo_tiny_values.c	(revision 39455)
+++ trunk/Ohana/src/libdvo/src/dvo_tiny_values.c	(revision 39457)
@@ -78,6 +78,12 @@
 int free_tiny_values (Catalog *catalog) {
 
-  if (catalog[0].averageT) free (catalog[0].averageT);
-  if (catalog[0].measureT) free (catalog[0].measureT);
+  if (catalog[0].averageT) {
+    free (catalog[0].averageT);
+    catalog[0].averageT = NULL;
+  }
+  if (catalog[0].measureT) { 
+    free (catalog[0].measureT);
+    catalog[0].measureT = NULL;
+  }
   return (TRUE);
 }
Index: trunk/Ohana/src/libdvo/src/dvo_util.c
===================================================================
--- trunk/Ohana/src/libdvo/src/dvo_util.c	(revision 39455)
+++ trunk/Ohana/src/libdvo/src/dvo_util.c	(revision 39457)
@@ -1,198 +1,192 @@
+#include <dvo_util.h>
+
 // dvo_util.c
 // This file contains a set of functions that provide simple read-only access to a dvo database
 //
-#include <dvo_util.h>
-
-void dvoFree(void *ptr)
-{
-    if (ptr) {
-        FREE(ptr);
-    }
-}
-
-dvoConfig * dvoConfigAlloc()
-{
-    dvoConfig *config;
-
-    ALLOCATE(config, dvoConfig, 1);
-
-    memset(config, 0, sizeof(dvoConfig));
-    return config;
-}
-
-void dvoConfigFree(dvoConfig *dvoConfig)
-{
-    if (dvoConfig) {
-        if (dvoConfig->skyTable) {
-            SkyTableFree(dvoConfig->skyTable);
-        }
-        if (dvoConfig->images) {
-            gfits_db_free(&dvoConfig->imageDB);
-        }
-        FREE(dvoConfig);
-    }
-}
-
-dvoConfig *dvoConfigRead(int *argc, char **argv)
-{
-    dvoConfig *dvoConfig = dvoConfigAlloc();
-    char MasterPhotcodeFile[256];
-
-    char *file = SelectConfigFile(argc, argv, "ptolemy");
-    char *configData = LoadConfigFile(file);
-    if (!configData) {
-        fprintf(stderr, "ERROR: can't find configuration file %s\n", file);
-        if (file) {
-            FREE(file);
-        }
-        exit(3);
-    }
-    FREE (file);
-    file = NULL;
-
-    ScanConfig (configData, "GSCFILE",         "%s", 0, dvoConfig->gscfile);
-    ScanConfig (configData, "CATDIR",          "%s", 0, dvoConfig->catdir);
-    ScanConfig (configData, "CATMODE",         "%s",  0, dvoConfig->catmode);
-    ScanConfig (configData, "CATFORMAT",       "%s",  0, dvoConfig->catformat);
-    ScanConfig (configData, "PHOTCODE_FILE",   "%s",  0, MasterPhotcodeFile);
-    if (!ScanConfig (configData, "SKY_DEPTH",    "%d",  0, &dvoConfig->skyDepth)) {
-        dvoConfig->skyDepth = 2;
-    }
-    if (!ScanConfig (configData, "SKY_TABLE",    "%s",  0, dvoConfig->skyTableFile)) {
-        dvoConfig->skyTableFile[0] = 0;
-    }
-
-    snprintf (dvoConfig->photcodeFile, 256, "%s/Photcodes.dat", dvoConfig->catdir);
-    if (!LoadPhotcodes (dvoConfig->photcodeFile, MasterPhotcodeFile, FALSE)) {
-        fprintf (stderr, "error loading photcode table %s or master file %s\n",
-            dvoConfig->photcodeFile, MasterPhotcodeFile);
-        exit (1);
-    }
-
-    double zero_point;
-    ScanConfig (configData, "ZERO_PT",                "%lf", 0, &zero_point);
-    SetZeroPoint (zero_point);
+
+void dvoFree(void *ptr) {
+  if (ptr) {
+    FREE(ptr);
+  }
+}
+
+dvoConfig *dvoConfigAlloc() {
+  dvoConfig *config;
+
+  ALLOCATE(config, dvoConfig, 1);
+
+  memset(config, 0, sizeof(dvoConfig));
+  return config;
+}
+
+void dvoConfigFree(dvoConfig *dvoConfig) {
+  if (dvoConfig) {
+    if (dvoConfig->skyTable) {
+      SkyTableFree(dvoConfig->skyTable);
+    }
+    if (dvoConfig->images) {
+      gfits_db_free(&dvoConfig->imageDB);
+    }
+    FREE(dvoConfig);
+  }
+}
+
+dvoConfig *dvoConfigRead(int *argc, char **argv) {
+  dvoConfig *dvoConfig = dvoConfigAlloc();
+  char MasterPhotcodeFile[256];
+
+  char *file = SelectConfigFile(argc, argv, "ptolemy");
+  char *configData = LoadConfigFile(file);
+  if (!configData) {
+    fprintf(stderr, "ERROR: can't find configuration file %s\n", file);
+    if (file) {
+      FREE(file);
+    }
+    exit(3);
+  }
+  FREE (file);
+  file = NULL;
+
+  ScanConfig (configData, "GSCFILE",         "%s", 0, dvoConfig->gscfile);
+  ScanConfig (configData, "CATDIR",          "%s", 0, dvoConfig->catdir);
+  ScanConfig (configData, "CATMODE",         "%s",  0, dvoConfig->catmode);
+  ScanConfig (configData, "CATFORMAT",       "%s",  0, dvoConfig->catformat);
+  ScanConfig (configData, "PHOTCODE_FILE",   "%s",  0, MasterPhotcodeFile);
+  if (!ScanConfig (configData, "SKY_DEPTH",    "%d",  0, &dvoConfig->skyDepth)) {
+    dvoConfig->skyDepth = 2;
+  }
+  if (!ScanConfig (configData, "SKY_TABLE",    "%s",  0, dvoConfig->skyTableFile)) {
+    dvoConfig->skyTableFile[0] = 0;
+  }
+
+  snprintf (dvoConfig->photcodeFile, 256, "%s/Photcodes.dat", dvoConfig->catdir);
+  if (!LoadPhotcodes (dvoConfig->photcodeFile, MasterPhotcodeFile, FALSE)) {
+    fprintf (stderr, "error loading photcode table %s or master file %s\n",
+	     dvoConfig->photcodeFile, MasterPhotcodeFile);
+    exit (1);
+  }
+
+  double zero_point;
+  ScanConfig (configData, "ZERO_PT",                "%lf", 0, &zero_point);
+  SetZeroPoint (zero_point);
 
 #if (DVO_UTIL_READ_CAMERA_CONFIG)
-    // at one point I thought reading the camera configuration might be useful
-    // but we didn't need it
-    if (!ScanConfig (configData, "CAMERA_CONFIG", "%s", 0, dvoConfig->cameraConfig)) {
-        fprintf (stderr, "can't find CAMERA_CONFIG in configuration\n");
-        exit (3);
-    }
-    char * cameraConfigData = LoadConfigFile(dvoConfig->cameraConfig);
-    if (!cameraConfigData) {
-        fprintf (stderr, "failed to load %s\n", dvoConfig->cameraConfig);
-        exit (3);
-    }
-
-    ScanConfig (cameraConfigData, "NCCD", "%d", 1, &dvoConfig->nCCD);
+  // at one point I thought reading the camera configuration might be useful
+  // but we didn't need it
+  if (!ScanConfig (configData, "CAMERA_CONFIG", "%s", 0, dvoConfig->cameraConfig)) {
+    fprintf (stderr, "can't find CAMERA_CONFIG in configuration\n");
+    exit (3);
+  }
+  char * cameraConfigData = LoadConfigFile(dvoConfig->cameraConfig);
+  if (!cameraConfigData) {
+    fprintf (stderr, "failed to load %s\n", dvoConfig->cameraConfig);
+    exit (3);
+  }
+
+  ScanConfig (cameraConfigData, "NCCD", "%d", 1, &dvoConfig->nCCD);
 #endif
 
-    return (dvoConfig);
-}
-
-int dvoLoadImages(dvoConfig *dvoConfig)
-{
-    if (dvoConfig->images) {
-        return TRUE;
-    }
-
-    char filename[256];
+  return (dvoConfig);
+}
+
+int dvoLoadImages(dvoConfig *dvoConfig) {
+  if (dvoConfig->images) {
+    return TRUE;
+  }
+
+  char filename[256];
   
-    snprintf (filename, 256, "%s/Images.dat", dvoConfig->catdir);
-
-    gfits_db_init (&dvoConfig->imageDB);
-    dvoConfig->imageDB.lockstate = LCK_SOFT;
-    dvoConfig->imageDB.timeout   = 120.0;
-
-    if (!gfits_db_lock (&dvoConfig->imageDB, filename)) {
-        fprintf (stderr, "error opening image catalog %s (1)\n", filename);
-        return (FALSE);
-    }
-
-    if (dvoConfig->imageDB.dbstate == LCK_EMPTY) {
-        fprintf (stderr, "note: image catalog is empty\n");
-        ALLOCATE (dvoConfig->images, Image, 1);
-        dvoConfig->nImages = 1;
-        return (TRUE);
-    }
-
-    int status = dvo_image_load (&dvoConfig->imageDB, TRUE, FALSE);
-    gfits_db_close (&dvoConfig->imageDB);
-
-    if (!status) {
-        fprintf (stderr, "problem loading image database table\n");
-        return (FALSE);
-    }
-
-    dvoConfig->images = gfits_table_get_Image (&dvoConfig->imageDB.ftable, &dvoConfig->nImages, &dvoConfig->imageDB.scaledValue, &dvoConfig->imageDB.nativeOrder);
-    if (!dvoConfig->images) {
-        fprintf (stderr, "problem loading images\n");
-        return (FALSE);
-    }
-
+  snprintf (filename, 256, "%s/Images.dat", dvoConfig->catdir);
+
+  gfits_db_init (&dvoConfig->imageDB);
+  dvoConfig->imageDB.lockstate = LCK_SOFT;
+  dvoConfig->imageDB.timeout   = 120.0;
+
+  if (!gfits_db_lock (&dvoConfig->imageDB, filename)) {
+    fprintf (stderr, "error opening image catalog %s (1)\n", filename);
+    return (FALSE);
+  }
+
+  if (dvoConfig->imageDB.dbstate == LCK_EMPTY) {
+    fprintf (stderr, "note: image catalog is empty\n");
+    ALLOCATE (dvoConfig->images, Image, 1);
+    dvoConfig->nImages = 1;
     return (TRUE);
-}
-Image *dvoImageByExternID(dvoConfig *dvoConfig, int sourceID, int externID)
-{
-    int i;
+  }
+
+  int status = dvo_image_load (&dvoConfig->imageDB, TRUE, FALSE);
+  gfits_db_close (&dvoConfig->imageDB);
+
+  if (!status) {
+    fprintf (stderr, "problem loading image database table\n");
+    return (FALSE);
+  }
+
+  dvoConfig->images = gfits_table_get_Image (&dvoConfig->imageDB.ftable, &dvoConfig->nImages, &dvoConfig->imageDB.scaledValue, &dvoConfig->imageDB.nativeOrder);
+  if (!dvoConfig->images) {
+    fprintf (stderr, "problem loading images\n");
+    return (FALSE);
+  }
+
+  return (TRUE);
+}
+
+Image *dvoImageByExternID(dvoConfig *dvoConfig, unsigned short sourceID, unsigned int externID) {
+
+  unsigned int i;
     
-    if (!dvoLoadImages(dvoConfig)) return NULL;
-
-    for (i=0; i<dvoConfig->nImages; i++) {
-        Image *image = dvoConfig->images + i;
-        if ((image->externID == externID) && (image->sourceID == sourceID)) {
-            BuildChipMatch(dvoConfig->images, dvoConfig->nImages);
-	    return image;
-        }
-    }
-    fprintf(stderr, "can't find image for %d %d\n", sourceID, externID);
-    return NULL;
-}
-
-SkyTable *dvoLoadSkyTable(dvoConfig *dvoConfig)
-{
-    if (!dvoConfig->skyTable) {
-        char *skyfile = "";
-        dvoConfig->skyTable = SkyTableLoadOptimal(dvoConfig->catdir, skyfile, dvoConfig->gscfile,
-                                                    FALSE, dvoConfig->skyDepth, 0);
-    }
-
-    if (dvoConfig->skyTable == NULL) {
-        fprintf(stderr, "failed to load SkyTable\n");
-        return NULL;
-    }
-
-    SkyTableSetFilenames(dvoConfig->skyTable, dvoConfig->catdir, "cpt");
-
-    return dvoConfig->skyTable;
-}
-
-SkyList *dvoSkyListByExternID(dvoConfig *dvoConfig, int sourceID, int externID, Image **ppImage)
-{
-    Image *image = dvoImageByExternID(dvoConfig, sourceID, externID);
-    if (image == NULL) {
-        // fprintf(stderr, "can't find image for %d %d\n", sourceID, externID);
-        return NULL;
-    }
-
-    if (dvoLoadSkyTable(dvoConfig) == NULL) {
-        fprintf(stderr, "failed to load Sky table\n");
-        return NULL;
-    }
-    SkyList *skylist = SkyListByImage(dvoConfig->skyTable, -1, image);
-    if (!skylist->Nregions) {
-        fprintf(stderr, "failed to find SkyList for image  %d %d\n", sourceID, externID);
-        return NULL;
-    }
-
-    *ppImage = image;
-
-    return skylist;
-}
-
-off_t dvoGetDetections(SkyList *skylist, int imageID, dvoDetection **results, int *pMaxDetID)
-{
+  if (!dvoLoadImages(dvoConfig)) return NULL;
+
+  for (i = 0; i < dvoConfig->nImages; i++) {
+    Image *image = dvoConfig->images + i;
+    if ((image->externID == externID) && (image->sourceID == sourceID)) {
+      BuildChipMatch(dvoConfig->images, dvoConfig->nImages);
+      return image;
+    }
+  }
+  fprintf(stderr, "can't find image for %d %d\n", sourceID, externID);
+  return NULL;
+}
+
+SkyTable *dvoLoadSkyTable(dvoConfig *dvoConfig) {
+  if (!dvoConfig->skyTable) {
+    char *skyfile = "";
+    dvoConfig->skyTable = SkyTableLoadOptimal(dvoConfig->catdir, skyfile, dvoConfig->gscfile,
+					      FALSE, dvoConfig->skyDepth, 0);
+  }
+
+  if (dvoConfig->skyTable == NULL) {
+    fprintf(stderr, "failed to load SkyTable\n");
+    return NULL;
+  }
+
+  SkyTableSetFilenames(dvoConfig->skyTable, dvoConfig->catdir, "cpt");
+
+  return dvoConfig->skyTable;
+}
+
+SkyList *dvoSkyListByExternID(dvoConfig *dvoConfig, int sourceID, int externID, Image **ppImage) {
+  Image *image = dvoImageByExternID(dvoConfig, sourceID, externID);
+  if (image == NULL) {
+    // fprintf(stderr, "can't find image for %d %d\n", sourceID, externID);
+    return NULL;
+  }
+
+  if (dvoLoadSkyTable(dvoConfig) == NULL) {
+    fprintf(stderr, "failed to load Sky table\n");
+    return NULL;
+  }
+  SkyList *skylist = SkyListByImage(dvoConfig->skyTable, -1, image);
+  if (!skylist->Nregions) {
+    fprintf(stderr, "failed to find SkyList for image  %d %d\n", sourceID, externID);
+    return NULL;
+  }
+
+  *ppImage = image;
+
+  return skylist;
+}
+
+off_t dvoGetDetections(SkyList *skylist, unsigned int imageID, dvoDetection **results, unsigned int *pMaxDetID) {
   int GetMeasures = 1;
   int reg;
@@ -204,69 +198,71 @@
   *pMaxDetID = -1;
   for (reg=0; reg< skylist->Nregions; reg++) {
-      /* lock, load, unlock catalog */
-      Catalog catalog;
-
-      dvo_catalog_init (&catalog, TRUE);
-      catalog.filename = skylist->filename[reg];
-      catalog.catflags = GetMeasures ? DVO_LOAD_AVERAGE | DVO_LOAD_MEASURE | DVO_LOAD_SECFILT : DVO_LOAD_AVERAGE | DVO_LOAD_SECFILT;
-      catalog.Nsecfilt = 0;
-
-      // an error exit status here is a significant error
-      if (!dvo_catalog_open (&catalog, NULL, FALSE, "r")) {
-          fprintf (stderr, "ERROR: failure to open catalog file %s\n", catalog.filename);
-          exit (2);
+    /* lock, load, unlock catalog */
+    Catalog catalog;
+
+    dvo_catalog_init (&catalog, TRUE);
+    catalog.filename = skylist->filename[reg];
+    catalog.catflags = GetMeasures ? DVO_LOAD_AVERAGE | DVO_LOAD_MEASURE | DVO_LOAD_SECFILT : DVO_LOAD_AVERAGE | DVO_LOAD_SECFILT;
+    catalog.Nsecfilt = 0;
+
+    // an error exit status here is a significant error
+    if (!dvo_catalog_open (&catalog, NULL, FALSE, "r")) {
+      fprintf (stderr, "ERROR: failure to open catalog file %s\n", catalog.filename);
+      exit (2);
+    }
+    dvo_catalog_unlock (&catalog);
+
+    off_t Nmeasure = catalog.Nmeasure;
+
+    off_t i;
+    for (i=0; i< Nmeasure; i++) {
+      Measure *m = catalog.measure + i;
+      if (m->imageID != imageID) {
+	continue;
       }
-      dvo_catalog_unlock (&catalog);
-
-      off_t Nmeasure = catalog.Nmeasure;
-
-      off_t i;
-      for (i=0; i< Nmeasure; i++) {
-        Measure *m = catalog.measure + i;
-        if (m->imageID != imageID) {
-            continue;
-        }
-        Average *a = catalog.average + m->averef;
+      Average *a = catalog.average + m->averef;
         
-        dvoDetection *det = detections + Ndetect;
-
-        det->valid     = 1;
-        det->ave      = *a;
-        det->meas     = *m;
+      dvoDetection *det = detections + Ndetect;
+
+      det->valid     = 1;
+      det->ave      = *a;
+      det->meas     = *m;
 #ifdef notdfe
-        det->objID     = a->objID;
-        det->catID     = m->catID;
-        det->detID     = m->detID;
-        det->pspsObjID = a->extID;
-        det->pspsDetID = m->extID;
+      det->objID     = a->objID;
+      det->catID     = m->catID;
+      det->detID     = m->detID;
+      det->pspsObjID = a->extID;
+      det->pspsDetID = m->extID;
 #endif
         
-        if ((int) det->meas.detID > *pMaxDetID) {
-            *pMaxDetID = det->meas.detID;
-        }
-
-        Ndetect++;
-        CHECK_REALLOCATE(detections, dvoDetection, detectionsArrayLength, Ndetect, 1000);
+      if (det->meas.detID > *pMaxDetID) {
+	*pMaxDetID = det->meas.detID;
       }
 
-      dvo_catalog_free (&catalog);
+      Ndetect++;
+      CHECK_REALLOCATE(detections, dvoDetection, detectionsArrayLength, Ndetect, 1000);
+    }
+
+    dvo_catalog_free (&catalog);
   }
   size_t NInvalidDetID = 0;
   if (Ndetect) {
-      dvoDetection *sorted;
-      ALLOCATE(sorted, dvoDetection, *pMaxDetID + 1);
-
-      memset(sorted, 0, sizeof(dvoDetection) * *pMaxDetID);
-      off_t i;
-      for (i = 0; i < Ndetect; i++) {
-
-          if (detections[i].meas.detID < 0 || detections[i].meas.detID > (*pMaxDetID + 1))
-              NInvalidDetID++;
-          else
-              sorted[detections[i].meas.detID] = detections[i];
-      }
-      *results = sorted;
+    dvoDetection *sorted;
+    ALLOCATE(sorted, dvoDetection, *pMaxDetID + 1);
+
+    memset(sorted, 0, sizeof(dvoDetection) * *pMaxDetID);
+    off_t i;
+    for (i = 0; i < Ndetect; i++) {
+
+      // if (detections[i].meas.detID < 0 || detections[i].meas.detID > (*pMaxDetID + 1))
+
+      if (detections[i].meas.detID > (*pMaxDetID + 1))
+	NInvalidDetID++;
+      else
+	sorted[detections[i].meas.detID] = detections[i];
+    }
+    *results = sorted;
   } else {
-      *results = NULL;
+    *results = NULL;
   }
 
Index: trunk/Ohana/src/libdvo/src/dvosorts.c
===================================================================
--- trunk/Ohana/src/libdvo/src/dvosorts.c	(revision 39455)
+++ trunk/Ohana/src/libdvo/src/dvosorts.c	(revision 39457)
@@ -76,4 +76,5 @@
 /* sort a coordinate pair (X,Y) and the associated index (S) */
 void sort_coords_indexonly (double *X, double *Y, off_t *S, off_t N) {
+  OHANA_UNUSED_PARAM(Y);
   
 # define SWAPFUNC(A,B){ off_t itmp; \
Index: trunk/Ohana/src/libdvo/src/match_image.c
===================================================================
--- trunk/Ohana/src/libdvo/src/match_image.c	(revision 39455)
+++ trunk/Ohana/src/libdvo/src/match_image.c	(revision 39457)
@@ -1,5 +1,5 @@
 # include "dvo.h"
 
-off_t match_image (Image *image, off_t Nimage, unsigned int T, short int S) {
+off_t match_image (Image *image, off_t Nimage, e_time T, short int S) {
 
   off_t N, Nlo, Nhi, N1, N2;
@@ -37,5 +37,5 @@
 }
 
-off_t match_image_subset (Image *image, off_t *subset, off_t Nsubset, unsigned int T, short int S) {
+off_t match_image_subset (Image *image, off_t *subset, off_t Nsubset, e_time T, short int S) {
 
   off_t N, Nlo, Nhi, N1, N2;
Index: trunk/Ohana/src/libdvo/src/mosaic_astrom.c
===================================================================
--- trunk/Ohana/src/libdvo/src/mosaic_astrom.c	(revision 39455)
+++ trunk/Ohana/src/libdvo/src/mosaic_astrom.c	(revision 39457)
@@ -64,4 +64,8 @@
     images[i].coords.mosaic = &images[j].coords;
   }
+
+  free (DISentry);
+  free (DIStzero);
+
   return (TRUE);
 }
Index: trunk/Ohana/src/libfits/extern/gzip.c
===================================================================
--- trunk/Ohana/src/libfits/extern/gzip.c	(revision 39455)
+++ trunk/Ohana/src/libfits/extern/gzip.c	(revision 39457)
@@ -122,5 +122,5 @@
 
   z_stream stream;
-  int i, err;
+  int err;
   
   stream.next_in = (Bytef*)source;
@@ -140,4 +140,5 @@
   if (EXTRA_VERBOSE) {
     fprintf (stderr, "inp cmp: ");
+    unsigned long int i;
     for (i = 0; i < sourceLen; i++) {
       fprintf (stderr, "0x%02hhx ", source[i]);
@@ -165,4 +166,5 @@
   if (EXTRA_VERBOSE) {
     fprintf (stderr, "out cmp: ");
+    unsigned long int i;
     for (i = 0; i < stream.total_out; i++) {
       fprintf (stderr, "0x%02hhx ", dest[i]);
@@ -182,5 +184,5 @@
 
   z_stream stream;
-  int i, err;
+  int err;
   
   stream.next_in = (Bytef*)source;
@@ -200,4 +202,5 @@
   if (EXTRA_VERBOSE) {
     fprintf (stderr, "inp unc: ");
+    unsigned long int i;
     for (i = 0; i < sourceLen; i++) {
       fprintf (stderr, "0x%02hhx ", source[i]);
@@ -226,4 +229,5 @@
   if (EXTRA_VERBOSE) {
     fprintf (stderr, "out unc: ");
+    unsigned long int i;
     for (i = 0; i < stream.total_out; i++) {
       fprintf (stderr, "0x%02hhx ", dest[i]);
Index: trunk/Ohana/src/libfits/header/F_write_H.c
===================================================================
--- trunk/Ohana/src/libfits/header/F_write_H.c	(revision 39455)
+++ trunk/Ohana/src/libfits/header/F_write_H.c	(revision 39457)
@@ -25,5 +25,5 @@
     myAssert (myBlock->startblock == OHANA_MEMMAGIC, "bad memory");
     myAssert (myBlock->endblock == OHANA_MEMMAGIC, "bad memory");
-    myAssert (myBlock->size >= header[0].datasize, "overflow");
+    myAssert (myBlock->size >= (size_t) header[0].datasize, "overflow");
   }
 # endif
Index: trunk/Ohana/src/libfits/include/gfits_compress.h
===================================================================
--- trunk/Ohana/src/libfits/include/gfits_compress.h	(revision 39457)
+++ trunk/Ohana/src/libfits/include/gfits_compress.h	(revision 39457)
@@ -0,0 +1,28 @@
+# include <zlib.h>
+
+/* functions defined in ricecomp.c */
+int fits_rcomp(int a[], int nx,	unsigned char *c, int clen, int nblock);
+int fits_rcomp_short(short a[], int nx, unsigned char *c, int clen, int nblock);
+int fits_rcomp_byte(char a[], int nx, unsigned char *c, int clen, int nblock);
+int fits_rdecomp (unsigned char *c, int clen, unsigned int array[], int nx, int nblock);
+int fits_rdecomp_short (unsigned char *c, int clen, unsigned short array[], int nx, int nblock);
+int fits_rdecomp_byte (unsigned char *c, int clen, unsigned char array[], int nx, int nblock);
+
+/* functions defined in fits_hcompress.c */
+# define LONGLONG long long
+int fits_hcompress(int *a, int ny, int nx, int scale, char *output, long *nbytes, int *status);
+int fits_hcompress64(LONGLONG *a, int ny, int nx, int scale, char *output, long *nbytes, int *status);
+
+/* functions defined in fits_hdeccompress.c */
+int fits_hdecompress(unsigned char *input, int smooth, int *a, int *ny, int *nx, int *scale, int *status);
+int fits_hdecompress64(unsigned char *input, int smooth, LONGLONG *a, int *ny, int *nx, int *scale, int *status);
+
+/* functions defined in pliocomp.c */
+int pl_p2li (int *pxsrc, int xs, short *lldst, int npix);
+int pl_l2pi (short *ll_src, int xs, int *px_dst, int npix);
+
+/* functions defined in gzip.c */
+int gfits_gz_stripheader (unsigned char *data, int *ndata);
+int gfits_uncompress (Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen);
+int gfits_compress (Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen);
+
Index: trunk/Ohana/src/libfits/include/gfitsio.h
===================================================================
--- trunk/Ohana/src/libfits/include/gfitsio.h	(revision 39455)
+++ trunk/Ohana/src/libfits/include/gfitsio.h	(revision 39457)
@@ -193,23 +193,23 @@
 
 int     gfits_uncompress_image 	       PROTO((Header *header, Matrix *matrix, FTable *ftable));
-int     gfits_uncompress_data  	       PROTO((char *zdata, int Nzdata, char *cmptype, char **optname, char **optvalue, int Nopt, char *outdata, int *Nout, int Nout_alloc, int out_pixsize));
-int     gfits_distribute_data  	       PROTO((Matrix *matrix, char *data, int Ndata, int bitpix, int *otile, int oblank, int *ztile, int zblank, float zscale, float zzero));
-
-int     gfits_compress_data  	       PROTO((char *zdata, int *Nzdata, char *cmptype, char **optname, char **optvalue, int Nopt, char *rawdata, int Nraw, int raw_pixsize, int Nx, int Ny));
-int     gfits_compress_image 	       PROTO((Header *header, Matrix *matrix, FTable *ftable, int *Ztile, char *zcmptype));
-int     gfits_collect_data   	       PROTO((Matrix *matrix, char *raw, int Nraw, int raw_pixsize, int *otile, int oblank, int *ztile, int zblank, float zscale, float zzero));
+int     gfits_uncompress_data  	       PROTO((char *zdata, unsigned long int Nzdata, char *cmptype, char **optname, char **optvalue, int Nopt, char *outdata, unsigned long int *Nout, unsigned long int Nout_alloc, int out_pixsize));
+int     gfits_distribute_data  	       PROTO((Matrix *matrix, char *data, unsigned long int Ndata, int bitpix, int *otile, int oblank, unsigned long int *ztile, int zblank, float zscale, float zzero));
+
+int     gfits_compress_data  	       PROTO((char *zdata, unsigned long int *Nzdata, char *cmptype, char **optname, char **optvalue, int Nopt, char *rawdata, unsigned long int Nraw, int raw_pixsize, int Nx, int Ny));
+int     gfits_compress_image 	       PROTO((Header *header, Matrix *matrix, FTable *ftable, unsigned long int *Ztile, char *zcmptype));
+int     gfits_collect_data   	       PROTO((Matrix *matrix, char *raw, unsigned long int Nraw, int raw_pixsize, int *otile, int oblank, unsigned long int *ztile, int zblank, float zscale, float zzero));
 
 int     gfits_copy_keywords_compress   PROTO((Header *srchead, Header *tgthead));
 int     gfits_swap_raw   	       PROTO((Matrix *matrix));
 
-off_t   gfits_tile_size                PROTO((Matrix *matrix, int *otile, int *ztile));
-int 	gfits_imtile_maxsize           PROTO((Matrix *matrix, int *ztile));
-int 	gfits_imtile_count             PROTO((Matrix *matrix, int *ztile, int *ntile));
+off_t   gfits_tile_size                PROTO((Matrix *matrix, int *otile, unsigned long int *ztile));
+int 	gfits_imtile_maxsize           PROTO((Matrix *matrix, unsigned long int *ztile));
+int 	gfits_imtile_count             PROTO((Matrix *matrix, unsigned long int *ztile, int *ntile));
 int 	gfits_imtile_start             PROTO((Matrix *matrix, int *otile));
-int 	gfits_imtile_next              PROTO((Matrix *matrix, int *ztile, int *ntile, int *otile));
+int 	gfits_imtile_next              PROTO((Matrix *matrix, unsigned long int *ztile, int *ntile, int *otile));
 
 int     gfits_extension_is_compressed_image  PROTO((Header *header));
 int     gfits_extension_is_compressed_table  PROTO((Header *header));
-int     gfits_byteswap_zdata   	        PROTO((char *zdata, int Nzdata, int pixsize));
+int     gfits_byteswap_zdata   	        PROTO((char *zdata, off_t Nzdata, int pixsize));
 int     gfits_compressed_data_pixsize   PROTO((char *cmptype, int out_bitpix, char **optname, char **optvalue, int Noptions));
 int     gfits_uncompressed_data_pixsize PROTO((char *cmptype, int out_bitpix, char **optname, char **optvalue, int Noptions));
@@ -279,5 +279,5 @@
 int     gfits_write_Theader            PROTO((char *filename, Header *header));
 
-int     gfits_compress_table           PROTO((FTable *srctable, FTable *tgttable, int ztilelen, char *zcmptype));
+int     gfits_compress_table           PROTO((FTable *srctable, FTable *tgttable, unsigned long int ztilelen, char *zcmptype));
 int     gfits_uncompress_table         PROTO((FTable *srctable, FTable *tgttable));
 
Index: trunk/Ohana/src/libfits/matrix/F_compress_M.c
===================================================================
--- trunk/Ohana/src/libfits/matrix/F_compress_M.c	(revision 39455)
+++ trunk/Ohana/src/libfits/matrix/F_compress_M.c	(revision 39457)
@@ -4,5 +4,5 @@
 # define VERBOSE_DUMP 0
 
-int gfits_collect_gzp2 (Matrix *matrix, char *raw, int Nraw, int raw_bitpix, int *otile, int oblank, int *ztile, int zblank, float zscale, float zzero);
+int gfits_collect_gzp2 (Matrix *matrix, char *raw, unsigned long int Nraw, int raw_bitpix, int *otile, int oblank, unsigned long int *ztile, int zblank, float zscale, float zzero);
 
 // the user needs to specify the various compression options:
@@ -23,5 +23,5 @@
 # define ESCAPE { fprintf (stderr, "error in %s @ line %d\n", __func__, __LINE__); goto escape; }
 
-int gfits_compress_image (Header *header, Matrix *matrix, FTable *ftable, int *Ztile, char *zcmptype) {
+int gfits_compress_image (Header *header, Matrix *matrix, FTable *ftable, unsigned long int *Ztile, char *zcmptype) {
 
   int i;
@@ -33,5 +33,5 @@
   char *zdata = NULL;
 
-  int *ztile = Ztile;
+  unsigned long int *ztile = Ztile;
 
   Header *theader = ftable->header;
@@ -41,5 +41,5 @@
   // determine the number of tiles (from ztile[] and image size)
   if (!ztile) {
-    ALLOCATE (ztile, int, matrix->Naxes);
+    ALLOCATE (ztile, unsigned long int, matrix->Naxes);
     ztile[0] = matrix->Naxis[0];
     for (i = 1; i < matrix->Naxes; i++) ztile[i] = 1;
@@ -99,5 +99,5 @@
   for (i = 0; i < header->Naxes; i++) {
     snprintf (keyword, 10, "ZTILE%d", i + 1);
-    if (!gfits_modify (theader, keyword, "%d", 1, ztile[i])) ESCAPE;
+    if (!gfits_modify (theader, keyword, "%lu", 1, ztile[i])) ESCAPE;
   }
 
@@ -157,5 +157,5 @@
 
   // size (in pixels) of the largest tile
-  int max_tile_size = gfits_imtile_maxsize (matrix, ztile);
+  unsigned long int max_tile_size = gfits_imtile_maxsize (matrix, ztile);
 
   // size of a pixel in the raw pixel buffer (before compression)
@@ -179,5 +179,5 @@
 
   // allocate the buffer for compression work
-  int Nzdata_alloc = raw_pixsize*max_tile_size + 100;
+  unsigned long int Nzdata_alloc = raw_pixsize*max_tile_size + 100;
   ALLOCATE (raw,   char, raw_pixsize*max_tile_size);
   ALLOCATE (zdata, char, Nzdata_alloc);
@@ -191,5 +191,5 @@
 
     // size of the current tile in pixels
-    int Nraw = gfits_tile_size (matrix, otile, ztile);
+    unsigned long int Nraw = gfits_tile_size (matrix, otile, ztile);
 
     // copy the raw pixels from their native matrix locations to the temporary output buffer
@@ -216,5 +216,5 @@
       if (!gfits_byteswap_zdata (raw, Nraw * raw_pixsize, raw_pixsize)) ESCAPE;
     }
-    int Nzdata = Nzdata_alloc; // available space, replaced with actual output size on compression
+    unsigned long int Nzdata = Nzdata_alloc; // available space, replaced with actual output size on compression
 
     if (VERBOSE_DUMP && (i == 0)) {
@@ -223,5 +223,5 @@
       for (k = 0; k < 64; k++) { fprintf (stderr, "%02hhx", raw[k]); if (k % 4 == 3) fprintf (stderr, " "); } 
       fprintf (stderr, "\n");
-      fprintf (stderr, "Nzdata: %d -> ", Nzdata);
+      fprintf (stderr, "Nzdata: %lu -> ", Nzdata);
     }
 
@@ -231,5 +231,5 @@
     if (VERBOSE_DUMP && (i == 0)) {
       int k;
-      fprintf (stderr, "%d\n", Nzdata);
+      fprintf (stderr, "%lu\n", Nzdata);
       fprintf (stderr, "cmp SWP: "); 
       for (k = 0; k < 64; k++) { fprintf (stderr, "%02hhx", zdata[k]); if (k % 4 == 3) fprintf (stderr, " "); } 
@@ -290,9 +290,14 @@
 
 int gfits_copy_keywords_compress (Header *srchead, Header *tgthead) {
-
+  OHANA_UNUSED_PARAM(tgthead);
+  OHANA_UNUSED_PARAM(srchead);
+
+# if (0)
   int i;
 
   for (i = 0; i < srchead->datasize; i += FT_LINE_LENGTH) {
   }
+# endif
+
   return TRUE;
 }
@@ -303,12 +308,12 @@
 // * ztile gives the size of the i-th dimension of the current tile
 // * raw_bitpix defines the size and type of the raw buffer
-int gfits_collect_data (Matrix *matrix, char *raw, int Nraw, int raw_bitpix, int *otile, int oblank, int *ztile, int zblank, float zscale, float zzero) {
-
-  int i, j, start, offset, coord, Nline;
-  int *counter = NULL;
-  int *Ztile = NULL;
-
-  ALLOCATE (counter, int, matrix->Naxes); // counter for current row in tile to copy
-  ALLOCATE (Ztile, int, matrix->Naxes); // true sizes of this tile (in pixels)
+int gfits_collect_data (Matrix *matrix, char *raw, unsigned long int Nraw, int raw_bitpix, int *otile, int oblank, unsigned long int *ztile, int zblank, float zscale, float zzero) {
+
+  int i, k, start, offset, coord, Nline;
+  unsigned int *counter = NULL;
+  unsigned long int *Ztile = NULL;
+
+  ALLOCATE (counter, unsigned int, matrix->Naxes); // counter for current row in tile to copy
+  ALLOCATE (Ztile, unsigned long int, matrix->Naxes); // true sizes of this tile (in pixels)
   
   for (i = 0; i < matrix->Naxes; i++) {
@@ -343,4 +348,5 @@
   // this macro is used at the inner switch to run the actual loop
 # define SCALE_AND_DIST_INT_PRINT(TYPE, SIZE, INTYPE) {			\
+    unsigned long int j;						\
     TYPE *TILEptr = (TYPE *) &matrix->buffer[SIZE*(offset + start)];	\
     for (j = 0; j < Ztile[0]; j++, TILEptr++, RAWptr++) {		\
@@ -356,4 +362,5 @@
   // this macro is used at the inner switch to run the actual loop
 # define SCALE_AND_DIST_INT(OTYPE, OSIZE) {				\
+    unsigned long int j;						\
     OTYPE *TILEptr = (OTYPE *) &matrix->buffer[OSIZE*(offset + start)];	\
     for (j = 0; j < Ztile[0]; j++, TILEptr++, RAWptr++) {		\
@@ -370,4 +377,5 @@
   // this macro is used at the inner switch to run the actual loop
 # define SCALE_AND_DIST_FLOAT(OTYPE, OSIZE) {				\
+    unsigned long int j;						\
     OTYPE *TILEptr = (OTYPE *) &matrix->buffer[OSIZE*(offset + start)];	\
     for (j = 0; j < Ztile[0]; j++, TILEptr++, RAWptr++) {		\
@@ -419,13 +427,13 @@
 
     // update the counters, carrying to the next dimension if needed
-    for (j = 1; j < matrix->Naxes; j++) {
-      counter[j] ++;
-      if (counter[j] == Ztile[j]) {
-	counter[j] = 0;
+    for (k = 1; k < matrix->Naxes; k++) {
+      counter[k] ++;
+      if (counter[k] == Ztile[k]) {
+	counter[k] = 0;
       } else {
 	break;
       }
     }
-    if (j == matrix->Naxes) assert (i == Nline - 1); // we should be done here...
+    if (k == matrix->Naxes) assert (i == Nline - 1); // we should be done here...
 
     // Naxes = 3
@@ -435,6 +443,6 @@
     // determine the offset of the next line relative to the start position
     offset = counter[matrix->Naxes - 1];
-    for (j = matrix->Naxes - 2; j >= 0; j--) {
-      offset = offset*matrix->Naxis[j] + counter[j];
+    for (k = matrix->Naxes - 2; k >= 0; k--) {
+      offset = offset*matrix->Naxis[k] + counter[k];
     }      
   }
@@ -453,24 +461,29 @@
 // * ztile gives the size of the i-th dimension of the current tile
 // * raw_bitpix defines the size and type of the raw buffer
-int gfits_collect_gzp2 (Matrix *matrix, char *raw, int Nraw, int raw_bitpix, int *otile, int oblank, int *ztile, int zblank, float zscale, float zzero) {
-
-  int i, j, k;
-  int *counter = NULL;
-  int *Ztile = NULL;
-
-  ALLOCATE (counter, int, matrix->Naxes); // counter for current row in tile to copy
-  ALLOCATE (Ztile, int, matrix->Naxes); // true sizes of this tile (in pixels)
+int gfits_collect_gzp2 (Matrix *matrix, char *raw, unsigned long int Nraw, int raw_bitpix, int *otile, int oblank, unsigned long int *ztile, int zblank, float zscale, float zzero) {
+  OHANA_UNUSED_PARAM(oblank);
+  OHANA_UNUSED_PARAM(zblank);
+  OHANA_UNUSED_PARAM(zzero);
+  OHANA_UNUSED_PARAM(zscale);
+
+  unsigned long int i, j;
+  unsigned int *counter = NULL;
+  unsigned long int *Ztile = NULL;
+
+  ALLOCATE (counter, unsigned int, matrix->Naxes); // counter for current row in tile to copy
+  ALLOCATE (Ztile, unsigned long int, matrix->Naxes); // true sizes of this tile (in pixels)
   
-  for (i = 0; i < matrix->Naxes; i++) {
-    counter[i] = 0;
-    Ztile[i] = MIN ((matrix->Naxis[i] - otile[i]*ztile[i]), ztile[i]);
+  int k;
+  for (k = 0; k < matrix->Naxes; k++) {
+    counter[k] = 0;
+    Ztile[k] = MIN ((matrix->Naxis[k] - otile[k]*ztile[k]), ztile[k]);
   }
 
   // number of lines in the tile (in pixels)
-  int Nline = 1;
-  int Npix = matrix->Naxis[0];
-  for (i = 1; i < matrix->Naxes; i++) {
-    Nline *= Ztile[i];
-    Npix  *= matrix->Naxis[i];
+  unsigned long int Nline = 1;
+  unsigned long int Npix = matrix->Naxis[0];
+  for (k = 1; k < matrix->Naxes; k++) {
+    Nline *= Ztile[k];
+    Npix  *= matrix->Naxis[k];
   }
 
@@ -482,7 +495,7 @@
   // start = otile[0]*ztile[0] + Naxis[0]*(otile[1]*ztile[1] + Naxis[1]*(otile[2]*ztile[2] + ...));
   int start = otile[matrix->Naxes-1]*ztile[matrix->Naxes-1];
-  for (i = matrix->Naxes - 2; i >= 0; i--) {
-    int coord = otile[i]*ztile[i];
-    start = start*matrix->Naxis[i] + coord;
+  for (k = matrix->Naxes - 2; k >= 0; k--) {
+    unsigned long int coord = otile[k]*ztile[k];
+    start = start*matrix->Naxis[k] + coord;
   }
   
@@ -519,13 +532,14 @@
 
       // update the counters, carrying to the next dimension if needed
-      for (j = 1; j < matrix->Naxes; j++) {
-	counter[j] ++;
-	if (counter[j] == Ztile[j]) {
-	  counter[j] = 0;
+      int axis;
+      for (axis = 1; axis < matrix->Naxes; axis++) {
+	counter[axis] ++;
+	if (counter[axis] == Ztile[axis]) {
+	  counter[axis] = 0;
 	} else {
 	  break;
 	}
       }
-      if (j == matrix->Naxes) assert (i == Nline - 1); // we should be done here...
+      if (axis == matrix->Naxes) assert (i == Nline - 1); // we should be done here...
 
       // Naxes = 3
@@ -535,6 +549,6 @@
       // determine the offset of the next line relative to the start position
       offset = counter[matrix->Naxes - 1];
-      for (j = matrix->Naxes - 2; j >= 0; j--) {
-	offset = offset*matrix->Naxis[j] + counter[j];
+      for (axis = matrix->Naxes - 2; axis >= 0; axis--) {
+	offset = offset*matrix->Naxis[axis] + counter[axis];
       }      
     }
Index: trunk/Ohana/src/libfits/matrix/F_compress_data.c
===================================================================
--- trunk/Ohana/src/libfits/matrix/F_compress_data.c	(revision 39455)
+++ trunk/Ohana/src/libfits/matrix/F_compress_data.c	(revision 39457)
@@ -2,30 +2,5 @@
 # include <gfitsio.h>
 # include <zlib.h>
-
-/* functions defined in ricecomp.c */
-int fits_rcomp(int a[], int nx,	unsigned char *c, int clen, int nblock);
-int fits_rcomp_short(short a[], int nx, unsigned char *c, int clen, int nblock);
-int fits_rcomp_byte(char a[], int nx, unsigned char *c, int clen, int nblock);
-int fits_rdecomp (unsigned char *c, int clen, unsigned int array[], int nx, int nblock);
-int fits_rdecomp_short (unsigned char *c, int clen, unsigned short array[], int nx, int nblock);
-int fits_rdecomp_byte (unsigned char *c, int clen, unsigned char array[], int nx, int nblock);
-
-/* functions defined in fits_hcompress.c */
-# define LONGLONG long long
-int fits_hcompress(int *a, int ny, int nx, int scale, char *output, long *nbytes, int *status);
-int fits_hcompress64(LONGLONG *a, int ny, int nx, int scale, char *output, long *nbytes, int *status);
-
-/* functions defined in fits_hdeccompress.c */
-int fits_hdecompress(unsigned char *input, int smooth, int *a, int *ny, int *nx, int *scale, int *status);
-int fits_hdecompress64(unsigned char *input, int smooth, LONGLONG *a, int *ny, int *nx, int *scale, int *status);
-
-/* functions defined in pliocomp.c */
-int pl_p2li (int *pxsrc, int xs, short *lldst, int npix);
-int pl_l2pi (short *ll_src, int xs, int *px_dst, int npix);
-
-/* functions defined in gzip.c */
-int gfits_gz_stripheader (unsigned char *data, int *ndata);
-int gfits_uncompress (Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen);
-int gfits_compress (Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen);
+# include <gfits_compress.h>
 
 # define ESCAPE(RET) { fprintf (stderr, "gzip error in %s @ %s:%d\n", __func__, __FILE__, __LINE__); return (RET); }
@@ -33,10 +8,6 @@
 // XXX I'm putting Nx and Ny on the argument list -- only used by hcompress
 // with a little work, these could go on the option list
-int gfits_compress_data (char *zdata, int *Nzdata, char *cmptype, 
-			 char **optname, char **optvalue, int Nopt, 
-			 char *rawdata, int Nrawpix, int rawpix_size,
-			 int Nx, int Ny) {
+int gfits_compress_data (char *zdata, unsigned long int *Nzdata, char *cmptype, char **optname, char **optvalue, int Nopt, char *rawdata, unsigned long int Nrawpix, int rawpix_size, int Nx, int Ny) {
 
-  int Nout;
   int status;
 
@@ -68,4 +39,5 @@
 
   if (!strcasecmp(cmptype, "RICE_1") || !strcasecmp(cmptype, "RICE_ONE")) {
+    long int Nout;
     int i, blocksize;
     // look for the BLOCKSIZE
@@ -85,6 +57,4 @@
     // fprintf (stderr, "%d comp bytes; %d uncomp 'pixels', totals: %d %d\n", Nzdata, Npix, Ninsum, Noutsum);
 
-    int k;
-
     switch (rawpix_size) {
       case 4:
@@ -98,5 +68,6 @@
 
 	if (0) {
-	  fprintf (stderr, "Nout: %d, Nrawpix: %d\n", Nout, Nrawpix);
+	  long int k;
+	  fprintf (stderr, "Nout: %lu, Nrawpix: %lu\n", Nout, Nrawpix);
 	  fprintf (stderr, "cmp inp: "); 
 	  for (k = 0; k < Nout; k++) { fprintf (stderr, "%02hhx", zdata[k]); if (k % 2) fprintf (stderr, " "); } 
@@ -119,9 +90,9 @@
       return (FALSE);
     }
-    if (Nout > *Nzdata) {
-      fprintf (stderr, "buffer overrun! %d out, %d available\n", Nout, *Nzdata);
+    if (Nout > (long int) *Nzdata) {
+      fprintf (stderr, "buffer overrun! %ld out, %lu available\n", Nout, *Nzdata);
       return FALSE;
     }
-    *Nzdata = Nout;
+    *Nzdata = (unsigned long int) Nout;
     return TRUE;
   }
@@ -129,5 +100,5 @@
   if (!strcasecmp(cmptype, "PLIO_1")) {
     // note the fortan starting point: zdata is decremented at start
-    Nout = pl_p2li ((int *) rawdata, 1, (short *) zdata, Nrawpix);
+    int Nout = pl_p2li ((int *) rawdata, 1, (short *) zdata, Nrawpix);
     *Nzdata = Nout;
     if (!Nout) return (FALSE);
Index: trunk/Ohana/src/libfits/matrix/F_compress_utils.c
===================================================================
--- trunk/Ohana/src/libfits/matrix/F_compress_utils.c	(revision 39455)
+++ trunk/Ohana/src/libfits/matrix/F_compress_utils.c	(revision 39457)
@@ -17,5 +17,5 @@
 
 typedef struct {
-  int *ztile; // max size of a tile (edge tiles may be smaller)
+  unsigned long int *ztile; // max size of a tile (edge tiles may be smaller)
   int *otile; // counter for current tile (eg, for (2,3,0) otile[0] = 2, otile[1] = 3, otile[2] = 0)
   int *ntile; // number of tiles in dimension [i]
@@ -23,5 +23,6 @@
 
 // advance the otile counter. 
-int gfits_imtile_next (Matrix *matrix, int *ztile, int *ntile, int *otile) {
+int gfits_imtile_next (Matrix *matrix, unsigned long int *ztile, int *ntile, int *otile) {
+  OHANA_UNUSED_PARAM(ztile);
 
   int i;
@@ -53,5 +54,5 @@
 
 // how many tiles needed for this image (given ztile[])
-int gfits_imtile_count (Matrix *matrix, int *ztile, int *ntile) {
+int gfits_imtile_count (Matrix *matrix, unsigned long int *ztile, int *ntile) {
 
   int i;
@@ -67,9 +68,9 @@
 
 // how many tiles needed for this image (given ztile[])
-int gfits_imtile_maxsize (Matrix *matrix, int *ztile) {
+int gfits_imtile_maxsize (Matrix *matrix, unsigned long int *ztile) {
 
   int i;
 
-  int max_tile_size = 1;
+  unsigned long int max_tile_size = 1;
   for (i = 0; i < matrix->Naxes; i++) {
     max_tile_size *= ztile[i];
@@ -80,5 +81,5 @@
 
 // true sizes of this tile (in pixels)
-off_t gfits_tile_size (Matrix *matrix, int *otile, int *ztile) {
+off_t gfits_tile_size (Matrix *matrix, int *otile, unsigned long int *ztile) {
 
   off_t i, Npixels, Ndimen;
@@ -93,5 +94,5 @@
 }
 
-int gfits_byteswap_zdata (char *zdata, int Nzdata, int pixsize) {
+int gfits_byteswap_zdata (char *zdata, off_t Nzdata, int pixsize) {
 
 # define DOSWAP(A,B) { char tmp = A; A = B; B = tmp; }
@@ -99,5 +100,5 @@
 # ifdef BYTE_SWAP
 
-  int i;
+  off_t i;
 
   // fprintf (stderr, "swapping %d bytes in pix of size %d bytes...\n", Nzdata, pixsize);
Index: trunk/Ohana/src/libfits/matrix/F_convert_format.c
===================================================================
--- trunk/Ohana/src/libfits/matrix/F_convert_format.c	(revision 39455)
+++ trunk/Ohana/src/libfits/matrix/F_convert_format.c	(revision 39457)
@@ -19,5 +19,5 @@
   in  = (inMode  *) matrix[0].buffer;			\
   for (i = 0; i < Npixels; i++, out++, in++)		\
-    if (*in == inBlank) {				\
+    if (*in == (inMode) inBlank) {			\
       *out = (MY_NAN);					\
     } else {						\
@@ -32,5 +32,5 @@
   in  = (inMode  *) matrix[0].buffer;		\
   for (i = 0; i < Npixels; i++, out++, in++)	\
-    if (*in == inBlank) {			\
+    if (*in == (inMode) inBlank) {			\
       *out = (MY_NAN);				\
     } else {					\
@@ -45,5 +45,5 @@
   in  = (inMode  *)matrix[0].buffer + Npixels - 1;	\
   for (i = 0; i < Npixels; i++, out--, in--)		\
-    if (*in == inBlank) {				\
+    if (*in == (inMode) inBlank) {				\
       *out = (MY_NAN);					\
     } else {						\
Index: trunk/Ohana/src/libfits/matrix/F_uncompress_M.c
===================================================================
--- trunk/Ohana/src/libfits/matrix/F_uncompress_M.c	(revision 39455)
+++ trunk/Ohana/src/libfits/matrix/F_uncompress_M.c	(revision 39457)
@@ -4,43 +4,45 @@
 # define VERBOSE_DUMP 0
 
-int gfits_distribute_gzp2 (Matrix *matrix, char *raw, int Nraw, int raw_bitpix, int *otile, int oblank, int *ztile, int zblank, float zscale, float zzero);
-
-# define ESCAPE { \
-  fprintf (stderr, "error in %s @ line %d\n", __func__, __LINE__); \
-  if (ztile != NULL) free (ztile); \
-  if (optname != NULL) { \
-    for (j = 0; j < Noptions; j++) { \
-      free (optname[j]); \
-      free (optvalue[j]); \
-    } \
-    free (optname); \
-    free (optvalue); \
-  } \
-  if (out != NULL) free (out); \
-  if (otile != NULL) free (otile); \
-  if (ntile != NULL) free (ntile); \
-  return (FALSE); }
-
-# define MOD_KEYWORD(ZNAME,NAME,TYPE,IN,OUT) { \
+int gfits_distribute_gzp2 (Matrix *matrix, char *raw, unsigned long int Nraw, int raw_bitpix, int *otile, int oblank, unsigned long int *ztile, int zblank, float zscale, float zzero);
+
+# define ESCAPE {							\
+    fprintf (stderr, "error in %s @ line %d\n", __func__, __LINE__);	\
+    if (ztile != NULL) free (ztile);					\
+    if (optname != NULL) {						\
+      int opt;								\
+      for (opt = 0; opt < Noptions; opt++) {				\
+	free (optname[opt]);						\
+	free (optvalue[opt]);						\
+      }									\
+      free (optname);							\
+      free (optvalue);							\
+    }									\
+    if (out != NULL) free (out);					\
+    if (otile != NULL) free (otile);					\
+    if (ntile != NULL) free (ntile);					\
+    return (FALSE); }
+
+# define MOD_KEYWORD(ZNAME,NAME,TYPE,IN,OUT) {	   \
     if (gfits_scan (header, ZNAME, TYPE, 1, IN)) { \
-      gfits_modify (header, NAME, TYPE, 1, OUT); \
-    } \
+      gfits_modify (header, NAME, TYPE, 1, OUT);   \
+    }						   \
     gfits_delete (header, ZNAME, 1); }
 
-# define MOD_KEYWORD_ALT(ZNAME,NAME,TYPE,IN,OUT) { \
+# define MOD_KEYWORD_ALT(ZNAME,NAME,TYPE,IN,OUT) {     \
     if (gfits_scan_alt (header, ZNAME, TYPE, 1, IN)) { \
-      gfits_modify_alt (header, NAME, TYPE, 1, OUT); \
-    } \
+      gfits_modify_alt (header, NAME, TYPE, 1, OUT);   \
+    }						       \
     gfits_delete (header, ZNAME, 1); }
 
-# define MOD_KEYWORD_REQUIRED(ZNAME,NAME,TYPE,IN,OUT) { \
-  if (!gfits_scan (header, ZNAME, TYPE, 1, IN)) ESCAPE; \
-  gfits_delete (header, ZNAME, 1); \
-  gfits_modify (header, NAME, TYPE, 1, OUT); }
+# define MOD_KEYWORD_REQUIRED(ZNAME,NAME,TYPE,IN,OUT) {		\
+    if (!gfits_scan (header, ZNAME, TYPE, 1, IN)) ESCAPE;	\
+    gfits_delete (header, ZNAME, 1);				\
+    gfits_modify (header, NAME, TYPE, 1, OUT); }
 
 int gfits_uncompress_image (Header *header, Matrix *matrix, FTable *ftable) {
 
+  int status, zimage;
   off_t Nzdata, Nzrows, zcol;
-  int i, j, status, zimage, Nout, max_tile_size;
+  unsigned long int max_tile_size;
   char cmptype[80];
   char zaxis[10], naxis[10], key[10], word[81], exttype[81], checksum[81], datasum[81];
@@ -49,5 +51,5 @@
   float zscale, zzero;
 
-  int *ztile = NULL;
+  unsigned long int *ztile = NULL;
   int *otile = NULL;
   int *ntile = NULL;
@@ -77,8 +79,9 @@
   MOD_KEYWORD_REQUIRED ("ZNAXIS",  "NAXIS",  "%d", &header->Naxes,  header->Naxes);
 
-  for (i = 0; i < header->Naxes; i++) {
-    snprintf (zaxis, 10, "ZNAXIS%d", i + 1);
-    snprintf (naxis, 10, "NAXIS%d", i + 1);
-    MOD_KEYWORD_REQUIRED (zaxis,  naxis,  OFF_T_FMT,  &header->Naxis[i],  header->Naxis[i]);
+  int axis;
+  for (axis = 0; axis < header->Naxes; axis++) {
+    snprintf (zaxis, 10, "ZNAXIS%d", axis + 1);
+    snprintf (naxis, 10, "NAXIS%d", axis + 1);
+    MOD_KEYWORD_REQUIRED (zaxis,  naxis,  OFF_T_FMT,  &header->Naxis[axis],  header->Naxis[axis]);
   }    
 
@@ -86,15 +89,15 @@
   // the actual tile size may be smaller at the edge of a dimension.  if the ZTILEn
   // entries are not found, default to [Nx,1,1,...]
-  ALLOCATE (ztile, int, header->Naxes);
-  if (!gfits_scan (header, "ZTILE1", "%d", 1, &ztile[0])) {
+  ALLOCATE (ztile, unsigned long int, header->Naxes);
+  if (!gfits_scan (header, "ZTILE1", "%lu", 1, &ztile[0])) {
     ztile[0] = header->Naxis[0];
-    for (i = 1; i < header->Naxes; i++) {
-      ztile[i] = 1;
+    for (axis = 1; axis < header->Naxes; axis++) {
+      ztile[axis] = 1;
     }
   } else {
     gfits_delete (header, "ZTILE1", 1);
-    for (i = 1; i < header->Naxes; i++) {
-      snprintf (key, 10, "ZTILE%d", i + 1);
-      if (!gfits_scan (header, key, "%d", 1, &ztile[i])) ESCAPE;
+    for (axis = 1; axis < header->Naxes; axis++) {
+      snprintf (key, 10, "ZTILE%d", axis + 1);
+      if (!gfits_scan (header, key, "%lu", 1, &ztile[axis])) ESCAPE;
       gfits_delete (header, key, 1);
     }
@@ -199,10 +202,11 @@
   // find the COMPRESSED_DATA column (format should be 1PB, 1PI, 1PJ)
   // is it required that this be the only column?
-  for (i = 1; TRUE; i++) {
-    snprintf (key, 10, "TTYPE%d", i);
+  int colnum;
+  for (colnum = 1; TRUE; colnum++) {
+    snprintf (key, 10, "TTYPE%d", colnum);
     if (!gfits_scan (ftable->header, key, "%s", 1, word)) ESCAPE;
     if (!strcmp (word, "COMPRESSED_DATA")) break;
   }
-  zcol = i;
+  zcol = colnum;
 
   if (!gfits_varlength_column_define (ftable, &zdef, zcol)) ESCAPE;
@@ -220,12 +224,12 @@
   ALLOCATE (ntile, int, matrix->Naxes);
   max_tile_size = 1;
-  for (i = 0; i < matrix->Naxes; i++) {
-    otile[i] = 0;
-    ntile[i] = (matrix->Naxis[i] % ztile[i]) ? (matrix->Naxis[i] / ztile[i] + 1) : (matrix->Naxis[i] / ztile[i]);
-    max_tile_size *= ztile[i];
-
-    // ztile[i] is the default (or max) tile size in the i-th dimension
-    // ntile[i] is the number of tiles in the i-th dimension
-    // otile[i] is the current output tile counter in the i-th dimension
+  for (axis = 0; axis < matrix->Naxes; axis++) {
+    otile[axis] = 0;
+    ntile[axis] = (matrix->Naxis[axis] % ztile[axis]) ? (matrix->Naxis[axis] / ztile[axis] + 1) : (matrix->Naxis[axis] / ztile[axis]);
+    max_tile_size *= ztile[axis];
+
+    // ztile[axis] is the default (or max) tile size in the i-th dimension
+    // ntile[axis] is the number of tiles in the i-th dimension
+    // otile[axis] is the current output tile counter in the i-th dimension
   }
 
@@ -254,5 +258,5 @@
   // fprintf (stderr, "raw_pixsize: %d, cmp_pixsize: %d, tile_pixsize: %d, raw_bitpix: %d\n", raw_pixsize, cmp_pixsize, tile_pixsize, raw_bitpix);
 
-  int Nout_alloc = raw_pixsize*max_tile_size;
+  unsigned long int Nout_alloc = raw_pixsize*max_tile_size;
   ALLOCATE (out, char, Nout_alloc);
 
@@ -271,5 +275,5 @@
 
     // expected output size for this tile
-    Nout = raw_pixsize*gfits_tile_size (matrix, otile, ztile);
+    unsigned long Nout = raw_pixsize*gfits_tile_size (matrix, otile, ztile);
 
     zdata = gfits_varlength_column_pointer (ftable, &zdef, row, &Nzdata);
@@ -297,5 +301,5 @@
       for (k = 0; k < 64; k++) { fprintf (stderr, "%02hhx", zdata[k]); if (k % 4 == 3) fprintf (stderr, " "); } 
       fprintf (stderr, "\n");
-      fprintf (stderr, "Nout  : %d -> ", Nout);
+      fprintf (stderr, "Nout  : %lu -> ", Nout);
     }
     
@@ -307,5 +311,5 @@
     if (VERBOSE_DUMP && (row == 0)) {
       int k;
-      fprintf (stderr, "%d\n", Nout);
+      fprintf (stderr, "%lu\n", Nout);
       fprintf (stderr, "unc swp: "); 
       for (k = 0; k < 64; k++) { fprintf (stderr, "%02hhx", out[k]); if (k % 4 == 3) fprintf (stderr, " "); } 
@@ -315,5 +319,5 @@
     if (!strcasecmp(cmptype, "GZIP_1")) {
       // Nout is number of pixels
-      if (!gfits_byteswap_zdata (out, Nout * raw_pixsize, raw_pixsize)) ESCAPE;
+      if (!gfits_byteswap_zdata (out, (off_t) (Nout * raw_pixsize), raw_pixsize)) ESCAPE;
     }
     
@@ -340,8 +344,8 @@
 
     // update the tile counters, carrying to the next dimension if needed
-    for (j = 0; j < matrix->Naxes; j++) {
-      otile[j] ++;
-      if (otile[j] == ntile[j]) {
-	otile[j] = 0;
+    for (axis = 0; axis < matrix->Naxes; axis++) {
+      otile[axis] ++;
+      if (otile[axis] == ntile[axis]) {
+	otile[axis] = 0;
       } else {
 	break;
@@ -352,7 +356,8 @@
   FREE (ztile);
   if (optname != NULL) {
-    for (j = 0; j < Noptions; j++) {
-      FREE (optname[j]);
-      FREE (optvalue[j]);
+    int opt;
+    for (opt = 0; opt < Noptions; opt++) {
+      FREE (optname[opt]);
+      FREE (optvalue[opt]);
     }
     FREE (optname);
@@ -366,24 +371,24 @@
 
 // bitpix is the input data size/type
-int gfits_distribute_data (Matrix *matrix, char *raw, int Nraw, int raw_bitpix, int *otile, int oblank, int *ztile, int zblank, float zscale, float zzero) {
-
-  int i, j;
-  int *counter = NULL;
-  int *Ztile = NULL;
-
-  ALLOCATE (counter, int, matrix->Naxes);
-  ALLOCATE (Ztile, int, matrix->Naxes);
+int gfits_distribute_data (Matrix *matrix, char *raw, unsigned long int Nraw, int raw_bitpix, int *otile, int oblank, unsigned long int *ztile, int zblank, float zscale, float zzero) {
+
+  int axis;
+  unsigned int *counter = NULL;
+  unsigned long int *Ztile = NULL;
+
+  ALLOCATE (counter, unsigned int, matrix->Naxes);
+  ALLOCATE (Ztile, unsigned long int, matrix->Naxes);
 
   // counter for current row in tile to copy
   // true sizes of this tile (in pixels)
-  for (i = 0; i < matrix->Naxes; i++) {
-    counter[i] = 0;
-    Ztile[i] = MIN ((matrix->Naxis[i] - otile[i]*ztile[i]), ztile[i]);
+  for (axis = 0; axis < matrix->Naxes; axis++) {
+    counter[axis] = 0;
+    Ztile[axis] = MIN ((matrix->Naxis[axis] - otile[axis]*ztile[axis]), ztile[axis]);
   }
 
   // number of lines in the tile (in pixels)
-  int Nline = 1;
-  for (i = 1; i < matrix->Naxes; i++) {
-    Nline *= Ztile[i];
+  unsigned long int Nline = 1;
+  for (axis = 1; axis < matrix->Naxes; axis++) {
+    Nline *= Ztile[axis];
   }
 
@@ -394,16 +399,17 @@
   // start = otile[0]*ztile[0] + otile[1]*ztile[1]*Naxis[0] + otile[2]*ztile[2]*Naxis[0]*Naxis[1] + ...;
   // start = otile[0]*ztile[0] + Naxis[0]*(otile[1]*ztile[1] + Naxis[1]*(otile[2]*ztile[2] + ...));
-  int start = otile[matrix->Naxes-1]*ztile[matrix->Naxes-1];
-  for (i = matrix->Naxes - 2; i >= 0; i--) {
-    int coord = otile[i]*ztile[i];
-    start = start*matrix->Naxis[i] + coord;
+  unsigned long int start = otile[matrix->Naxes-1]*ztile[matrix->Naxes-1];
+  for (axis = matrix->Naxes - 2; axis >= 0; axis--) {
+    unsigned long int coord = otile[axis]*ztile[axis];
+    start = start*matrix->Naxis[axis] + coord;
   }
   
   // pixel offset in output array relative to tile start
-  int offset = 0;
+  unsigned long int offset = 0;
 
   int directCopy = (zzero == 0.0) && (zscale == 1.0);
 
 # define SCALE_AND_DIST_INT_PRINT(TYPE, SIZE) {				\
+    unsigned long j;							\
     TYPE *TILEptr = (TYPE *) &matrix->buffer[SIZE*(offset + start)];	\
     for (j = 0; j < Ztile[0]; j++, TILEptr++, RAWptr++) {		\
@@ -418,4 +424,5 @@
   // this macro is used at the inner switch to run the actual loop
 # define SCALE_AND_DIST_INT(OTYPE, OSIZE) {				\
+    unsigned long j;							\
     OTYPE *TILEptr = (OTYPE *) &matrix->buffer[OSIZE*(offset + start)];	\
     for (j = 0; j < Ztile[0]; j++, TILEptr++, RAWptr++) {		\
@@ -432,4 +439,5 @@
   // this macro is used at the inner switch to run the actual loop
 # define SCALE_AND_DIST_FLOAT(OTYPE, OSIZE) {				\
+    unsigned long j;							\
     OTYPE *TILEptr = (OTYPE *) &matrix->buffer[OSIZE*(offset + start)];	\
     for (j = 0; j < Ztile[0]; j++, TILEptr++, RAWptr++) {		\
@@ -461,5 +469,5 @@
       case   8: SCALE_AND_DIST_INT   (char,   1); break; \
       case  16: SCALE_AND_DIST_INT   (short,  2); break; \
-      case  32: SCALE_AND_DIST_INT (int,    4); break; \
+      case  32: SCALE_AND_DIST_INT   (int,    4); break; \
       case -32: SCALE_AND_DIST_FLOAT (float,  4); break; \
       case -64: SCALE_AND_DIST_FLOAT (double, 8); break; \
@@ -468,4 +476,5 @@
 
   // loop over lines in the tile
+  unsigned long int i;
   for (i = 0; i < Nline; i++) {
     switch (raw_bitpix) {
@@ -479,13 +488,13 @@
 
     // update the counters, carrying to the next dimension if needed
-    for (j = 1; j < matrix->Naxes; j++) {
-      counter[j] ++;
-      if (counter[j] == Ztile[j]) {
-	counter[j] = 0;
+    for (axis = 1; axis < matrix->Naxes; axis++) {
+      counter[axis] ++;
+      if (counter[axis] == Ztile[axis]) {
+	counter[axis] = 0;
       } else {
 	break;
       }
     }
-    if (j == matrix->Naxes) assert (i == Nline - 1); // we should be done here...
+    if (axis == matrix->Naxes) assert (i == Nline - 1); // we should be done here...
 
     // Naxes = 3
@@ -495,6 +504,6 @@
     // determine the offset of the next line relative to the start position
     offset = counter[matrix->Naxes - 1];
-    for (j = matrix->Naxes - 2; j >= 0; j--) {
-      offset = offset*matrix->Naxis[j] + counter[j];
+    for (axis = matrix->Naxes - 2; axis >= 0; axis--) {
+      offset = offset*matrix->Naxis[axis] + counter[axis];
     }      
   }
@@ -506,26 +515,30 @@
 
 // bitpix is the input data size/type
-int gfits_distribute_gzp2 (Matrix *matrix, char *raw, int Nraw, int raw_bitpix, int *otile, int oblank, int *ztile, int zblank, float zscale, float zzero) {
-
-  int i, j, k;
-  int *counter = NULL;
-  int *Ztile = NULL;
-
-  ALLOCATE (counter, int, matrix->Naxes);
-  ALLOCATE (Ztile, int, matrix->Naxes);
+int gfits_distribute_gzp2 (Matrix *matrix, char *raw, unsigned long int Nraw, int raw_bitpix, int *otile, int oblank, unsigned long int *ztile, int zblank, float zscale, float zzero) {
+  OHANA_UNUSED_PARAM(oblank);
+  OHANA_UNUSED_PARAM(zblank);
+  OHANA_UNUSED_PARAM(zzero);
+  OHANA_UNUSED_PARAM(zscale);
+
+  int axis;
+  unsigned int *counter = NULL;
+  unsigned long int *Ztile = NULL;
+
+  ALLOCATE (counter, unsigned int, matrix->Naxes);
+  ALLOCATE (Ztile, unsigned long int, matrix->Naxes);
 
   // counter for current row in tile to copy
   // true sizes of this tile (in pixels)
-  for (i = 0; i < matrix->Naxes; i++) {
-    counter[i] = 0;
-    Ztile[i] = MIN ((matrix->Naxis[i] - otile[i]*ztile[i]), ztile[i]);
+  for (axis = 0; axis < matrix->Naxes; axis++) {
+    counter[axis] = 0;
+    Ztile[axis] = MIN ((matrix->Naxis[axis] - otile[axis]*ztile[axis]), ztile[axis]);
   }
 
   // number of lines in the tile (in pixels)
-  int Nline = 1;
-  int Npix = matrix->Naxis[0];
-  for (i = 1; i < matrix->Naxes; i++) {
-    Nline *= Ztile[i];
-    Npix  *= matrix->Naxis[i];
+  unsigned long int Nline = 1;
+  unsigned long int Npix = matrix->Naxis[0];
+  for (axis = 1; axis < matrix->Naxes; axis++) {
+    Nline *= Ztile[axis];
+    Npix  *= matrix->Naxis[axis];
   }
 
@@ -536,8 +549,8 @@
   // start = otile[0]*ztile[0] + otile[1]*ztile[1]*Naxis[0] + otile[2]*ztile[2]*Naxis[0]*Naxis[1] + ...;
   // start = otile[0]*ztile[0] + Naxis[0]*(otile[1]*ztile[1] + Naxis[1]*(otile[2]*ztile[2] + ...));
-  int start = otile[matrix->Naxes-1]*ztile[matrix->Naxes-1];
-  for (i = matrix->Naxes - 2; i >= 0; i--) {
-    int coord = otile[i]*ztile[i];
-    start = start*matrix->Naxis[i] + coord;
+  unsigned long int start = otile[matrix->Naxes-1]*ztile[matrix->Naxes-1];
+  for (axis = matrix->Naxes - 2; axis >= 0; axis--) {
+    unsigned long int coord = otile[axis]*ztile[axis];
+    start = start*matrix->Naxis[axis] + coord;
   }
   
@@ -553,8 +566,10 @@
 
   // pixel offset in output array relative to tile start
-  int offset = 0;
+  unsigned long int offset = 0;
 
   static int pass = 0;
+  int k;
   for (k = 0; k < size; k++) {
+    unsigned long int i;
     for (i = 0; i < Nline; i++) {
 # ifdef BYTE_SWAP      
@@ -564,4 +579,5 @@
 # endif
       char *rawptr = &raw[i*Ztile[0] + k*Nraw];	
+      unsigned long j;
       for (j = 0; j < Ztile[0]; j++, srcptr += size, rawptr ++) {		
 	if (FALSE && (i == 0) && (j < 4) && (pass == 0)) {
@@ -574,13 +590,13 @@
 
       // update the counters, carrying to the next dimension if needed
-      for (j = 1; j < matrix->Naxes; j++) {
-	counter[j] ++;
-	if (counter[j] == Ztile[j]) {
-	  counter[j] = 0;
+      for (axis = 1; axis < matrix->Naxes; axis++) {
+	counter[axis] ++;
+	if (counter[axis] == Ztile[axis]) {
+	  counter[axis] = 0;
 	} else {
 	  break;
 	}
       }
-      if (j == matrix->Naxes) assert (i == Nline - 1); // we should be done here...
+      if (axis == matrix->Naxes) assert (i == Nline - 1); // we should be done here...
 
       // Naxes = 3
@@ -590,6 +606,6 @@
       // determine the offset of the next line relative to the start position
       offset = counter[matrix->Naxes - 1];
-      for (j = matrix->Naxes - 2; j >= 0; j--) {
-	offset = offset*matrix->Naxis[j] + counter[j];
+      for (axis = matrix->Naxes - 2; axis >= 0; axis--) {
+	offset = offset*matrix->Naxis[axis] + counter[axis];
       }      
     }
Index: trunk/Ohana/src/libfits/matrix/F_uncompress_data.c
===================================================================
--- trunk/Ohana/src/libfits/matrix/F_uncompress_data.c	(revision 39455)
+++ trunk/Ohana/src/libfits/matrix/F_uncompress_data.c	(revision 39457)
@@ -2,31 +2,9 @@
 # include <gfitsio.h>
 # include <zlib.h>
-
-/* functions defined in ricecomp.c */
-int fits_rcomp(int a[], int nx,	unsigned char *c, int clen, int nblock);
-int fits_rdecomp (unsigned char *c, int clen, unsigned int array[], int nx, int nblock);
-int fits_rdecomp_short (unsigned char *c, int clen, unsigned short array[], int nx, int nblock);
-int fits_rdecomp_byte (unsigned char *c, int clen, unsigned char array[], int nx, int nblock);
-
-/* functions defined in fits_hcompress.c */
-# define LONGLONG long long
-int fits_hcompress(int *a, int ny, int nx, int scale, char *output, long *nbytes, int *status);
-int fits_hcompress64(LONGLONG *a, int ny, int nx, int scale, char *output, long *nbytes, int *status);
-
-/* functions defined in fits_hdeccompress.c */
-int fits_hdecompress(unsigned char *input, int smooth, int *a, int *ny, int *nx, int *scale, int *status);
-int fits_hdecompress64(unsigned char *input, int smooth, LONGLONG *a, int *ny, int *nx, int *scale, int *status);
-
-/* functions defined in pliocomp.c */
-int pl_p2li (int *pxsrc, int xs, short *lldst, int npix);
-int pl_l2pi (short *ll_src, int xs, int *px_dst, int npix);
-
-/* functions defined in gzip.c */
-int gfits_gz_stripheader (unsigned char *data, int *ndata);
-int gfits_uncompress (Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen);
+# include <gfits_compress.h>
 
 # define ESCAPE(RET) { fprintf (stderr, "gzip error in %s @ %s:%d\n", __func__, __FILE__, __LINE__); return (RET); }
 
-int gfits_uncompress_data (char *zdata, int Nzdata, char *cmptype, char **optname, char **optvalue, int Nopt, char *outdata, int *Nout, int Nout_alloc, int out_pixsize) {
+int gfits_uncompress_data (char *zdata, unsigned long Nzdata, char *cmptype, char **optname, char **optvalue, int Nopt, char *outdata, unsigned long int *Nout, unsigned long int Nout_alloc, int out_pixsize) {
 
   int status;
@@ -78,6 +56,5 @@
 
     int status = FALSE;
-    int Npix = *Nout / out_pixsize;
-    int k;
+    unsigned long int Npix = *Nout / out_pixsize;
 
     switch (out_pixsize) {
@@ -88,5 +65,6 @@
       case 2:
 	if (0) {
-	  fprintf (stderr, "Nout: %d, Nrawpix: %d\n", Nzdata, Npix);
+	  unsigned long int k;
+	  fprintf (stderr, "Nout: %lu, Nrawpix: %lu\n", Nzdata, Npix);
 	  fprintf (stderr, "cmp out: "); 
 	  for (k = 0; k < Nzdata; k++) { fprintf (stderr, "0x%02hhx ", zdata[k]); } 
@@ -112,7 +90,8 @@
   
   if (!strcasecmp(cmptype, "PLIO_1")) {
+    int Ntru = *Nout;
     int Npix;
-    Npix = pl_l2pi ((short *) zdata, 1, (int *) outdata, *Nout);
-    if (Npix != *Nout) {
+    Npix = pl_l2pi ((short *) zdata, 1, (int *) outdata, Ntru);
+    if (Npix != Ntru) {
       fprintf (stderr, "error in plio decompression\n");
       return (FALSE);
@@ -122,4 +101,5 @@
 
   if (!strcasecmp(cmptype, "HCOMPRESS_1")) {
+    unsigned long int Ntru = *Nout;
     int Nx, Ny, scale;
     status = 0;
@@ -132,5 +112,6 @@
     // fprintf (stderr, "decompression yields image %d x %d (scale: %d)\n", Nx, Ny, scale);
     
-    if (Nx * Ny != *Nout) {
+    unsigned long Npix = Nx * Ny;
+    if (Npix != Ntru) {
       fprintf (stderr, "error in hdecompress: mismatched output size\n");
       return (FALSE);
Index: trunk/Ohana/src/libfits/table/F_compress_T.c
===================================================================
--- trunk/Ohana/src/libfits/table/F_compress_T.c	(revision 39455)
+++ trunk/Ohana/src/libfits/table/F_compress_T.c	(revision 39457)
@@ -23,6 +23,6 @@
 # define ESCAPE { fprintf (stderr, "error in %s @ line %d\n", __func__, __LINE__); goto escape; }
 
-int gfits_collect_table_data (FTable *table, TableField *field, char *raw, int row_start, int Nrows);
-int gfits_collect_table_gzp2 (FTable *table, TableField *field, char *raw, int row_start, int Nrows);
+int gfits_collect_table_data (FTable *table, TableField *field, char *raw, unsigned long int row_start, unsigned long int Nrows);
+int gfits_collect_table_gzp2 (FTable *table, TableField *field, char *raw, unsigned long int row_start, unsigned long int Nrows);
 
 static float timeSum1 = 0.0;
@@ -51,7 +51,5 @@
 }
 
-int gfits_compress_table (FTable *srctable, FTable *tgttable, int ztilelen, char *zcmptype) {
-
-  int i, j;
+int gfits_compress_table (FTable *srctable, FTable *tgttable, unsigned long int ztilelen, char *zcmptype) {
 
   char keyword[81];
@@ -69,5 +67,5 @@
   gettimeofday (&startTimer, (void *) NULL);
 
-  int Ntile, ztilelast;
+  unsigned long int Ntile, ztilelast;
   if (!ztilelen) ztilelen = srcheader->Naxis[1];
 
@@ -104,26 +102,27 @@
 
   ALLOCATE_ZERO (fields, TableField, Nfields);
-  for (i = 0; i < Nfields; i++) {
-    snprintf (keyword, 80, "TTYPE%d", i+1);
-    if (!gfits_scan (srcheader, keyword, "%s", 1, fields[i].ttype)) ESCAPE;
-    if (!gfits_scan_alt (srcheader, keyword, "%C", 1, fields[i].ttype_cmt)) ESCAPE;
+
+  for (int field = 0; field < Nfields; field++) {
+    snprintf (keyword, 80, "TTYPE%d", field+1);
+    if (!gfits_scan (srcheader, keyword, "%s", 1, fields[field].ttype)) ESCAPE;
+    if (!gfits_scan_alt (srcheader, keyword, "%C", 1, fields[field].ttype_cmt)) ESCAPE;
 
     // TUNIT is not mandatory
-    snprintf (keyword, 80, "TUNIT%d", i+1);
-    if (!gfits_scan (srcheader, keyword, "%s", 1, fields[i].tunit)) {
-      fields[i].tunit[0] = 0;
+    snprintf (keyword, 80, "TUNIT%d", field+1);
+    if (!gfits_scan (srcheader, keyword, "%s", 1, fields[field].tunit)) {
+      fields[field].tunit[0] = 0;
     } else {
-      if (!gfits_scan_alt (srcheader, keyword, "%C", 1, fields[i].tunit_cmt)) ESCAPE;
+      if (!gfits_scan_alt (srcheader, keyword, "%C", 1, fields[field].tunit_cmt)) ESCAPE;
     }
     
-    snprintf (keyword, 80, "TFORM%d", i+1);
-    if (!gfits_scan (srcheader, keyword, "%s", 1, fields[i].tformat)) ESCAPE;
-    if (!gfits_scan_alt (srcheader, keyword, "%C", 1, fields[i].tformat_cmt)) ESCAPE;
+    snprintf (keyword, 80, "TFORM%d", field+1);
+    if (!gfits_scan (srcheader, keyword, "%s", 1, fields[field].tformat)) ESCAPE;
+    if (!gfits_scan_alt (srcheader, keyword, "%C", 1, fields[field].tformat_cmt)) ESCAPE;
 
     // for now we set all fields to the requested type.  since I do not yet know the column data types I cannot yet assign automatic cmptypes
-    strcpy (fields[i].zctype, zcmptype);
+    strcpy (fields[field].zctype, zcmptype);
 
     // by using "P" format, we are limited to 32bit pointers (2GB heap)
-    if (!gfits_define_bintable_column (tgtheader, "1QB(0)", fields[i].ttype, fields[i].ttype_cmt, fields[i].tunit, 1.0, 0.0)) ESCAPE;
+    if (!gfits_define_bintable_column (tgtheader, "1QB(0)", fields[field].ttype, fields[field].ttype_cmt, fields[field].tunit, 1.0, 0.0)) ESCAPE;
   }    
 
@@ -137,6 +136,6 @@
   char *tmpbuffer = NULL;
   ALLOCATE_ZERO (tmpbuffer, char, 16*Ntile); // need space for Ntile entries, each of width 16 bytes (2 long)
-  for (i = 0; i < Nfields; i++) {
-    if (!gfits_set_bintable_column (tgtheader, tgttable, fields[i].ttype, tmpbuffer, Ntile)) ESCAPE;
+  for (int field = 0; field < Nfields; field++) {
+    if (!gfits_set_bintable_column (tgtheader, tgttable, fields[field].ttype, tmpbuffer, Ntile)) ESCAPE;
   }
   free (tmpbuffer);
@@ -146,5 +145,5 @@
 
   // define compression-specific keywords, update header as needed.
-  if (!gfits_modify (tgtheader, "ZTILELEN", "%d", 1, ztilelen)) ESCAPE;
+  if (!gfits_modify (tgtheader, "ZTILELEN", "%lu", 1, ztilelen)) ESCAPE;
 
   if (!gfits_modify (tgtheader, "ZNAXIS1", OFF_T_FMT, 1, srcheader->Naxis[0])) ESCAPE;
@@ -163,27 +162,27 @@
   int offset = 0; // bytes from first column of first field to the current field (accumulate to set)
 
-  for (i = 0; i < Nfields; i++) {
-    snprintf (keyword, 81, "ZFORM%d", i+1);
-    if (!gfits_modify (tgtheader, keyword, "%s", 1, fields[i].tformat)) ESCAPE;
-    if (!gfits_varlength_column_define (tgttable, &fields[i].zdef, i+1)) ESCAPE;
-    if (!gfits_bintable_format (fields[i].tformat, fields[i].datatype, &fields[i].Nvalues, &fields[i].pixsize)) ESCAPE; // 
-    fields[i].rowsize = fields[i].Nvalues*fields[i].pixsize;
-    max_width = MAX(max_width, fields[i].rowsize);
-
-    if (!strcasecmp (fields[i].zctype, "AUTO")) {
-      if (!strcmp (fields[i].datatype, "short") ||
-	  !strcmp (fields[i].datatype, "float") || 
-	  !strcmp (fields[i].datatype, "double")|| 
-	  !strcmp (fields[i].datatype, "int64_t")) {
-	strcpy (fields[i].zctype, "GZIP_2");
+  for (int field = 0; field < Nfields; field++) {
+    snprintf (keyword, 81, "ZFORM%d", field+1);
+    if (!gfits_modify (tgtheader, keyword, "%s", 1, fields[field].tformat)) ESCAPE;
+    if (!gfits_varlength_column_define (tgttable, &fields[field].zdef, field+1)) ESCAPE;
+    if (!gfits_bintable_format (fields[field].tformat, fields[field].datatype, &fields[field].Nvalues, &fields[field].pixsize)) ESCAPE; // 
+    fields[field].rowsize = fields[field].Nvalues*fields[field].pixsize;
+    max_width = MAX(max_width, fields[field].rowsize);
+
+    if (!strcasecmp (fields[field].zctype, "AUTO")) {
+      if (!strcmp (fields[field].datatype, "short") ||
+	  !strcmp (fields[field].datatype, "float") || 
+	  !strcmp (fields[field].datatype, "double")|| 
+	  !strcmp (fields[field].datatype, "int64_t")) {
+	strcpy (fields[field].zctype, "GZIP_2");
 	goto got_cmptype;
       }
-      if (!strcmp (fields[i].datatype, "int")) {
-	strcpy (fields[i].zctype, "RICE_1");
+      if (!strcmp (fields[field].datatype, "int")) {
+	strcpy (fields[field].zctype, "RICE_1");
 	goto got_cmptype;
       }
-      if (!strcmp (fields[i].datatype, "byte") ||
-	  !strcmp (fields[i].datatype, "char")) {
-	strcpy (fields[i].zctype, "GZIP_1");
+      if (!strcmp (fields[field].datatype, "byte") ||
+	  !strcmp (fields[field].datatype, "char")) {
+	strcpy (fields[field].zctype, "GZIP_1");
 	goto got_cmptype;
       }
@@ -193,25 +192,25 @@
 
     // OVERRIDE: RICE can only be used on integer fields
-    if (!strcasecmp (fields[i].zctype, "RICE_1") || !strcasecmp (fields[i].zctype, "RICE_ONE")) {
-      if (!strcmp (fields[i].datatype, "float") || !strcmp (fields[i].datatype, "double") || !strcmp (fields[i].datatype, "int64_t")) {
-	strcpy (fields[i].zctype, "GZIP_2");
+    if (!strcasecmp (fields[field].zctype, "RICE_1") || !strcasecmp (fields[field].zctype, "RICE_ONE")) {
+      if (!strcmp (fields[field].datatype, "float") || !strcmp (fields[field].datatype, "double") || !strcmp (fields[field].datatype, "int64_t")) {
+	strcpy (fields[field].zctype, "GZIP_2");
       }
     }
 
     // OVERRIDE: GZIP_2 invalid for B (use GZIP_1)
-    if (!strcasecmp (fields[i].zctype, "GZIP_2") && !strcmp (fields[i].datatype, "byte")) {
-      strcpy (fields[i].zctype, "GZIP_1");
+    if (!strcasecmp (fields[field].zctype, "GZIP_2") && !strcmp (fields[field].datatype, "byte")) {
+      strcpy (fields[field].zctype, "GZIP_1");
     }
 
     // compression type per column (XXX for now we are just using zcmptype, as set above)
-    snprintf (keyword, 81, "ZCTYP%d", i+1);
-    if (!gfits_modify (tgtheader, keyword, "%s", 1, fields[i].zctype)) ESCAPE;
-
-    fields[i].offset = offset;
-    offset += fields[i].rowsize;
+    snprintf (keyword, 81, "ZCTYP%d", field+1);
+    if (!gfits_modify (tgtheader, keyword, "%s", 1, fields[field].zctype)) ESCAPE;
+
+    fields[field].offset = offset;
+    offset += fields[field].rowsize;
   }
 
   // allocate the intermediate storage buffers
-  int Nzdata_alloc = 2*max_width*ztilelen + 100;
+  unsigned long int Nzdata_alloc = 2*max_width*ztilelen + 100;
   ALLOCATE (raw,   char, max_width*ztilelen);
   ALLOCATE (zdata, char, Nzdata_alloc);
@@ -229,20 +228,20 @@
   // compress the data : copy into a tile, compress the tile, then add to the output table
   // each tile -> 1 row of the output table
-  for (i = 0; i < Ntile; i++) {
-
-    for (j = 0; j < Nfields; j++) {
-
-      gettimeofday (&startTimer, (void *) NULL);
-
-      int Nrows = (i == Ntile - 1) ? ztilelast : ztilelen;
-      int row_start = i*ztilelen; 
+  for (unsigned long int tile = 0; tile < Ntile; tile++) {
+
+    for (int field = 0; field < Nfields; field++) {
+
+      gettimeofday (&startTimer, (void *) NULL);
+
+      unsigned long int Nrows = (tile == Ntile - 1) ? ztilelast : ztilelen;
+      unsigned long int row_start = tile*ztilelen; 
       // ^- first row for this tile & field
       // NOTE: assumes each tile has the same length, ex the last (true for now)
 
       // copy the raw pixels from their native matrix locations to the temporary output buffer
-      if (!strcasecmp(fields[j].zctype, "GZIP_2") || !strcasecmp(fields[j].zctype, "NONE_2")) {
-	if (!gfits_collect_table_gzp2 (srctable, &fields[j], raw, row_start, Nrows)) ESCAPE;
+      if (!strcasecmp(fields[field].zctype, "GZIP_2") || !strcasecmp(fields[field].zctype, "NONE_2")) {
+	if (!gfits_collect_table_gzp2 (srctable, &fields[field], raw, row_start, Nrows)) ESCAPE;
       } else {
-	if (!gfits_collect_table_data (srctable, &fields[j], raw, row_start, Nrows)) ESCAPE;
+	if (!gfits_collect_table_data (srctable, &fields[field], raw, row_start, Nrows)) ESCAPE;
       }
       
@@ -256,7 +255,6 @@
   
       if (VERBOSE_DUMP) {
-	int k;
 	fprintf (stderr, "c1: ");
-	for (k = 0; k < Nrows*fields[j].Nvalues*fields[j].pixsize; k++) {
+	for (unsigned long int k = 0; k < Nrows*fields[field].Nvalues*fields[field].pixsize; k++) {
 	  fprintf (stderr, "%02hhx", raw[k]);
 	  if (k % 2) fprintf (stderr, " ");
@@ -269,7 +267,7 @@
       // optname, optvalue = NULL, Noptions = 0
       
-      int Nraw = Nrows*fields[j].Nvalues; // number of pixels
-      if (!strcasecmp(fields[j].zctype, "GZIP_1")) {
-	if (!gfits_byteswap_zdata (raw, Nraw * fields[j].pixsize, fields[j].pixsize)) ESCAPE;
+      unsigned long int Nraw = Nrows*fields[field].Nvalues; // number of pixels
+      if (!strcasecmp(fields[field].zctype, "GZIP_1")) {
+	if (!gfits_byteswap_zdata (raw, Nraw * fields[field].pixsize, fields[field].pixsize)) ESCAPE;
       }
 
@@ -281,7 +279,6 @@
   
       if (VERBOSE_DUMP) {
-	int k;
 	fprintf (stderr, "c2: ");
-	for (k = 0; k < Nrows*fields[j].Nvalues*fields[j].pixsize; k++) {
+	for (unsigned long int k = 0; k < Nrows*fields[field].Nvalues*fields[field].pixsize; k++) {
 	  fprintf (stderr, "%02hhx", raw[k]);
 	  if (k % 2) fprintf (stderr, " ");
@@ -291,6 +288,6 @@
       }
 
-      int Nzdata = Nzdata_alloc; // available space, replaced with actual output size on compression
-      if (!gfits_compress_data (zdata, &Nzdata, fields[j].zctype, NULL, NULL, 0, raw, Nraw, fields[j].pixsize, 0, 0)) ESCAPE;
+      unsigned long int Nzdata = Nzdata_alloc; // available space, replaced with actual output size on compression
+      if (!gfits_compress_data (zdata, &Nzdata, fields[field].zctype, NULL, NULL, 0, raw, Nraw, fields[field].pixsize, 0, 0)) ESCAPE;
       
       // XXX TIMER 2c
@@ -301,7 +298,6 @@
   
       if (VERBOSE_DUMP) {
-	int k;
 	fprintf (stderr, "c3: ");
-	for (k = 0; k < Nzdata; k++) {
+	for (unsigned long int k = 0; k < Nzdata; k++) {
 	  fprintf (stderr, "%02hhx", zdata[k]);
 	  if (k % 2) fprintf (stderr, " ");
@@ -311,10 +307,10 @@
       }
 
-      if (strcasecmp(fields[j].zctype, "NONE_2") && // NONE and NONE_1 not swapped?
-	  strcasecmp(fields[j].zctype, "GZIP_1") &&
-	  strcasecmp(fields[j].zctype, "GZIP_2") && 
-	  strcasecmp(fields[j].zctype, "RICE_1") && 
-	  strcasecmp(fields[j].zctype, "RICE_ONE")) {
-	if (!gfits_byteswap_zdata (zdata, Nzdata, fields[j].pixsize)) ESCAPE;
+      if (strcasecmp(fields[field].zctype, "NONE_2") && // NONE and NONE_1 not swapped?
+	  strcasecmp(fields[field].zctype, "GZIP_1") &&
+	  strcasecmp(fields[field].zctype, "GZIP_2") && 
+	  strcasecmp(fields[field].zctype, "RICE_1") && 
+	  strcasecmp(fields[field].zctype, "RICE_ONE")) {
+	if (!gfits_byteswap_zdata (zdata, Nzdata, fields[field].pixsize)) ESCAPE;
       }
 
@@ -326,7 +322,6 @@
   
       if (VERBOSE_DUMP) {
-	int k;
 	fprintf (stderr, "c4: ");
-	for (k = 0; k < Nzdata; k++) {
+	for (unsigned long int k = 0; k < Nzdata; k++) {
 	  fprintf (stderr, "%02hhx", zdata[k]);
 	  if (k % 2) fprintf (stderr, " ");
@@ -336,5 +331,5 @@
       }
 
-      if (!gfits_varlength_column_add_data (tgttable, zdata, Nzdata, i, &fields[j].zdef)) ESCAPE;
+      if (!gfits_varlength_column_add_data (tgttable, zdata, Nzdata, tile, &fields[field].zdef)) ESCAPE;
       // XXX TIMER 2e
       gettimeofday (&stopTimer, (void *) NULL); 
@@ -347,6 +342,6 @@
   if (OHANA_MEMCHECK) ohana_memcheck (TRUE);
 
-  for (i = 0; i < Nfields; i++) {
-    if (!gfits_varlength_column_finish (tgttable, &fields[i].zdef)) ESCAPE;
+  for (int field = 0; field < Nfields; field++) {
+    if (!gfits_varlength_column_finish (tgttable, &fields[field].zdef)) ESCAPE;
   }
 
@@ -375,7 +370,5 @@
 // raw_pixsize is the bytes / pixel for the input matrix
 // place the raw image bytes for the current tile into the tile buffer
-int gfits_collect_table_data (FTable *table, TableField *field, char *raw, int row_start, int Nrows) {
-
-  off_t i;
+int gfits_collect_table_data (FTable *table, TableField *field, char *raw, unsigned long int row_start, unsigned long int Nrows) {
 
   // we are copying NN rows into the column which starts at XX and has MM bytes per row
@@ -388,8 +381,8 @@
 
   if (VERBOSE) fprintf (stderr, "distribute: ");
-  for (i = 0; i < Nrows; i++, tblbuffer += Nx) {
+  for (unsigned long i = 0; i < Nrows; i++, tblbuffer += Nx) {
     memcpy (&raw[i*rowsize], tblbuffer, rowsize);
 # if (VERBOSE)
-    int j; for (j = 0; j < field->rowsize; j++) fprintf (stderr, "0x%02hhx ", table->buffer[Nx*row + field->offset + j]);
+    for (int j = 0; j < field->rowsize; j++) fprintf (stderr, "0x%02hhx ", table->buffer[Nx*row + field->offset + j]);
 # endif
   }
@@ -399,7 +392,5 @@
 }
 
-int gfits_collect_table_data_alt (FTable *table, TableField *field, char *raw, int row_start, int Nrows) {
-
-  off_t i;
+int gfits_collect_table_data_alt (FTable *table, TableField *field, char *raw, unsigned long int row_start, unsigned long int Nrows) {
 
   // we are copying NN rows of the column which starts at XX and has MM bytes per row
@@ -408,5 +399,5 @@
 
   if (VERBOSE) fprintf (stderr, "collect: ");
-  for (i = 0; i < Nrows; i++) {
+  for (unsigned long i = 0; i < Nrows; i++) {
     int row = row_start + i;
     memcpy (&raw[i*field->rowsize], &table->buffer[Nx*row + field->offset], field->rowsize);
@@ -420,7 +411,5 @@
 }
 
-int gfits_collect_table_gzp2 (FTable *table, TableField *field, char *raw, int row_start, int Nrows) {
-
-  off_t i, j, k;
+int gfits_collect_table_gzp2 (FTable *table, TableField *field, char *raw, unsigned long int row_start, unsigned long int Nrows) {
 
   // we are copying NN rows into the column which starts at XX and has MM bytes per row
@@ -433,5 +422,5 @@
   char *rawptr = raw;
 
-  for (k = 0; k < field->pixsize; k++) {
+  for (off_t k = 0; k < field->pixsize; k++) {
 # ifdef BYTE_SWAP      
     char *tblptr_start = &table->buffer[Nx*row_start + offset + (pixsize - k - 1)];
@@ -439,7 +428,7 @@
     char *tblptr_start = &table->buffer[Nx*row_start + offset + k];
 # endif
-    for (i = 0; i < Nrows; i++, tblptr_start += Nx) {
+    for (unsigned long int i = 0; i < Nrows; i++, tblptr_start += Nx) {
       char *tblptr = tblptr_start;
-      for (j = 0; j < Nvalues; j++, tblptr += pixsize, rawptr++) {
+      for (off_t j = 0; j < Nvalues; j++, tblptr += pixsize, rawptr++) {
 	*rawptr = *tblptr;
       }
@@ -449,7 +438,5 @@
 }
 
-int gfits_collect_table_gzp2_alt (FTable *table, TableField *field, char *raw, int row_start, int Nrows) {
-
-  off_t i, j, k;
+int gfits_collect_table_gzp2_alt (FTable *table, TableField *field, char *raw, unsigned long int row_start, unsigned long int Nrows) {
 
   // we are copying NN rows into the column which starts at XX and has MM bytes per row
@@ -457,7 +444,7 @@
   off_t Nx = table->header->Naxis[0];
 
-  for (k = 0; k < field->pixsize; k++) {
-    for (i = 0; i < Nrows; i++) {
-      int row = row_start + i;
+  for (off_t k = 0; k < field->pixsize; k++) {
+    for (unsigned long int i = 0; i < Nrows; i++) {
+      unsigned long int row = row_start + i;
       char *rawptr = &raw[i*field->Nvalues + k*Nrows*field->Nvalues];
 # ifdef BYTE_SWAP      
@@ -466,7 +453,8 @@
       char *tblptr = &table->buffer[Nx*row + field->offset + k];
 # endif
-      for (j = 0; j < field->Nvalues; j++, tblptr += field->pixsize, rawptr++) {
+      for (off_t j = 0; j < field->Nvalues; j++, tblptr += field->pixsize, rawptr++) {
 	*rawptr = *tblptr;
-	myAssert (rawptr - raw < Nrows*field->Nvalues*field->pixsize, "oops");
+	myAssert (rawptr >= raw, "oops");
+	myAssert ((unsigned long int)(rawptr - raw) < Nrows*field->Nvalues*field->pixsize, "oops");
 	myAssert (tblptr - table->buffer < table->header->Naxis[0]*table->header->Naxis[1], "oops");
       }
Index: trunk/Ohana/src/libfits/table/F_set_column.c
===================================================================
--- trunk/Ohana/src/libfits/table/F_set_column.c	(revision 39455)
+++ trunk/Ohana/src/libfits/table/F_set_column.c	(revision 39457)
@@ -109,5 +109,5 @@
   if (CHECK_MEMBLOCKS) {
     OhanaMemblock *ref = (OhanaMemblock *) array - 1;
-    fprintf (stderr, "ref: "OFF_T_FMT", array: "OFF_T_FMT"\n", (off_t) ref, (off_t) array);
+    fprintf (stderr, "ref: 0x%08lx, array: 0x%08lx, size: %ld, (%s@%d : %s), freed: %1d, Nalloc: %d\n", (long int) ref, (long int) array, ref->size, ref->file, ref->line, ref->func, ref->freed, ref->Nalloc);
     if (!ref->nextBlock && !ref->prevBlock) abort();
   }
@@ -120,5 +120,5 @@
   if (CHECK_MEMBLOCKS) {
     OhanaMemblock *ref = (OhanaMemblock *) array - 1;
-    fprintf (stderr, "ref: "OFF_T_FMT", array: "OFF_T_FMT"\n", (off_t) ref, (off_t) array);
+    fprintf (stderr, "ref: 0x%08lx, array: 0x%08lx, size: %ld, (%s@%d : %s), freed: %1d, Nalloc: %d\n", (long int) ref, (long int) array, ref->size, ref->file, ref->line, ref->func, ref->freed, ref->Nalloc);
     if (!ref->nextBlock && !ref->prevBlock) abort();
   }
@@ -212,5 +212,5 @@
   if (CHECK_MEMBLOCKS) {
     OhanaMemblock *ref = (OhanaMemblock *) array - 1;
-    fprintf (stderr, "ref: "OFF_T_FMT", array: "OFF_T_FMT"\n", (off_t) ref, (off_t) array);
+    fprintf (stderr, "ref: 0x%08lx, array: 0x%08lx, size: %ld, (%s@%d : %s), freed: %1d, Nalloc: %d\n", (long int) ref, (long int) array, ref->size, ref->file, ref->line, ref->func, ref->freed, ref->Nalloc);
     if (!ref->nextBlock && !ref->prevBlock) abort();
   }
@@ -241,5 +241,5 @@
   if (CHECK_MEMBLOCKS) {
     OhanaMemblock *ref = (OhanaMemblock *) array - 1;
-    fprintf (stderr, "ref: "OFF_T_FMT", array: "OFF_T_FMT"\n", (off_t) ref, (off_t) array);
+    fprintf (stderr, "ref: 0x%08lx, array: 0x%08lx, size: %ld, (%s@%d : %s), freed: %1d, Nalloc: %d\n", (long int) ref, (long int) array, ref->size, ref->file, ref->line, ref->func, ref->freed, ref->Nalloc);
     if (!ref->nextBlock && !ref->prevBlock) abort();
   }
Index: trunk/Ohana/src/libfits/table/F_table_varlength.c
===================================================================
--- trunk/Ohana/src/libfits/table/F_table_varlength.c	(revision 39455)
+++ trunk/Ohana/src/libfits/table/F_table_varlength.c	(revision 39457)
@@ -187,4 +187,5 @@
     ptr[0] = Ndata;
     ptr[1] = heap_offset - table->heap_start;
+    // fprintf (stderr, "row: %d, Ndata: %d, maxlen: %d, Ndata: %d, ptr1: %d\n", (int) row, (int) Ndata, (int) column->maxlen, (int) Ndata, (int) (heap_offset - table->heap_start));
   }
 
Index: trunk/Ohana/src/libfits/table/F_uncompress_T.c
===================================================================
--- trunk/Ohana/src/libfits/table/F_uncompress_T.c	(revision 39455)
+++ trunk/Ohana/src/libfits/table/F_uncompress_T.c	(revision 39457)
@@ -13,7 +13,6 @@
 int gfits_dump_raw_table (FTable *table, char *message) {
 # if (VERBOSE_DUMP)
-  int i;
   fprintf (stderr, "%s data:\n", message);
-  for (i = 0; i < table->header->Naxis[0]*table->header->Naxis[1]; i++) {
+  for (int i = 0; i < table->header->Naxis[0]*table->header->Naxis[1]; i++) {
     // for (i = 0; i < 16; i++) {
     fprintf (stderr, "%02hhx", table->buffer[i]);
@@ -22,4 +21,7 @@
   }
   fprintf (stderr, "\n");
+# else
+  OHANA_UNUSED_PARAM(table);
+  OHANA_UNUSED_PARAM(message);
 # endif
   return TRUE;
@@ -28,7 +30,6 @@
 int gfits_dump_cmp_table (FTable *table, char *message) {
 # if (VERBOSE_DUMP)
-  int i;
   fprintf (stderr, "%s pntr:\n", message);
-  for (i = 0; i < table->header->Naxis[0]*table->header->Naxis[1]; i++) {
+  for (int i = 0; i < table->header->Naxis[0]*table->header->Naxis[1]; i++) {
     fprintf (stderr, "%02hhx", table->buffer[i]);
     if (i % 2) fprintf (stderr, " ");
@@ -38,5 +39,5 @@
 
   fprintf (stderr, "%s data:\n", message);
-  for (i = 0; i < table->header->pcount; i++) {
+  for (int i = 0; i < table->header->pcount; i++) {
     fprintf (stderr, "%02hhx", table->buffer[table->heap_start + i]);
     if (i % 2) fprintf (stderr, " ");
@@ -44,4 +45,7 @@
   }
   fprintf (stderr, "\n");
+# else
+  OHANA_UNUSED_PARAM(table);
+  OHANA_UNUSED_PARAM(message);
 # endif
   return TRUE;
@@ -77,6 +81,4 @@
 int gfits_uncompress_table (FTable *srctable, FTable *tgttable) {
 
-  int i;
-
   char keyword[256];
 
@@ -114,5 +116,5 @@
 
   ALLOCATE (fields, TableField, Nfields);
-  for (i = 0; i < Nfields; i++) {
+  for (int i = 0; i < Nfields; i++) {
     snprintf (keyword, 80, "TTYPE%d", i+1);
     if (!gfits_scan (srcheader, keyword, "%s", 1, fields[i].ttype)) ESCAPE;
@@ -170,5 +172,5 @@
   // calling with an empty data array, data values are not actually copied (this is done
   // below after decompression)
-  for (i = 0; i < Nfields; i++) {
+  for (int i = 0; i < Nfields; i++) {
     if (!gfits_set_bintable_column (tgtheader, tgttable, fields[i].ttype, NULL, Ny)) ESCAPE;
   }
@@ -200,8 +202,7 @@
   gettimeofday (&startTimer, (void *) NULL);
 
-  off_t row;
-  for (row = 0; row < srcheader->Naxis[1]; row++) {
-
-    for (i = 0; i < Nfields; i++) {
+  for (off_t row = 0; row < srcheader->Naxis[1]; row++) {
+
+    for (int i = 0; i < Nfields; i++) {
 
       // gfits_uncompress_data can take values specific to the compression mode
@@ -218,7 +219,6 @@
     
       if (VERBOSE_DUMP) {
-	int k;
 	fprintf (stderr, "u4: ");
-	for (k = 0; k < Nzdata; k++) {
+	for (int k = 0; k < Nzdata; k++) {
 	  fprintf (stderr, "%02hhx", zdata[k]);
 	  if (k % 2) fprintf (stderr, " ");
@@ -250,7 +250,6 @@
   
       if (VERBOSE_DUMP) {
-	int k;
 	fprintf (stderr, "u3: ");
-	for (k = 0; k < Nzdata; k++) {
+	for (int k = 0; k < Nzdata; k++) {
 	  fprintf (stderr, "%02hhx", zdata[k]);
 	  if (k % 2) fprintf (stderr, " ");
@@ -266,12 +265,11 @@
       gettimeofday (&startTimer, (void *) NULL);
   
-      int Nrows = (row == Ntile - 1) ? ztilelast : ztilelen;
-      int Nraw = Nrows*fields[i].Nvalues*fields[i].pixsize; // expected number of bytes
+      unsigned long int Nrows = (row == Ntile - 1) ? ztilelast : ztilelen;
+      unsigned long int Nraw = Nrows*fields[i].Nvalues*fields[i].pixsize; // expected number of bytes
       if (!gfits_uncompress_data (zdata, Nzdata, fields[i].zctype, NULL, NULL, 0, raw, &Nraw, Nraw_alloc, fields[i].pixsize)) ESCAPE;
 
       if (VERBOSE_DUMP) {
-	int k;
 	fprintf (stderr, "u2: ");
-	for (k = 0; k < Nraw*fields[i].pixsize; k++) {
+	for (unsigned long int k = 0; k < Nraw*fields[i].pixsize; k++) {
 	  fprintf (stderr, "%02hhx", raw[k]);
 	  if (k % 2) fprintf (stderr, " ");
@@ -299,7 +297,6 @@
   
       if (VERBOSE_DUMP) {
-	int k;
 	fprintf (stderr, "u1: ");
-	for (k = 0; k < Nraw*fields[i].pixsize; k++) {
+	for (unsigned long int k = 0; k < Nraw*fields[i].pixsize; k++) {
 	  fprintf (stderr, "%02hhx", raw[k]);
 	  if (k % 2) fprintf (stderr, " ");
@@ -356,6 +353,4 @@
 int gfits_distribute_table_data (FTable *table, TableField *field, char *raw, int row_start, int Nrows) {
 
-  off_t i;
-
   // we are copying NN rows into the column which starts at XX and has MM bytes per row
 
@@ -367,8 +362,8 @@
 
   if (VERBOSE) fprintf (stderr, "distribute: ");
-  for (i = 0; i < Nrows; i++, tblbuffer += Nx) {
+  for (off_t i = 0; i < Nrows; i++, tblbuffer += Nx) {
     memcpy (tblbuffer, &raw[i*rowsize], rowsize);
 # if (VERBOSE)
-    int j; for (j = 0; j < field->rowsize; j++) fprintf (stderr, "0x%02hhx ", table->buffer[Nx*row + field->offset + j]);
+    for (int j = 0; j < field->rowsize; j++) fprintf (stderr, "0x%02hhx ", table->buffer[Nx*row + field->offset + j]);
 # endif
   }
@@ -379,6 +374,4 @@
 
 int gfits_distribute_table_gzp2 (FTable *table, TableField *field, char *raw, int row_start, int Nrows) {
-
-  off_t i, j, k;
 
   // we are copying NN rows into the column which starts at XX and has MM bytes per row
@@ -391,5 +384,5 @@
   char *rawptr = raw;
 
-  for (k = 0; k < field->pixsize; k++) {
+  for (off_t k = 0; k < field->pixsize; k++) {
 # ifdef BYTE_SWAP      
     char *tblptr_start = &table->buffer[Nx*row_start + offset + (pixsize - k - 1)];
@@ -397,7 +390,7 @@
     char *tblptr_start = &table->buffer[Nx*row_start + offset + k];
 # endif
-    for (i = 0; i < Nrows; i++, tblptr_start += Nx) {
+    for (off_t i = 0; i < Nrows; i++, tblptr_start += Nx) {
       char *tblptr = tblptr_start;
-      for (j = 0; j < Nvalues; j++, tblptr += pixsize, rawptr++) {
+      for (off_t j = 0; j < Nvalues; j++, tblptr += pixsize, rawptr++) {
 	*tblptr = *rawptr;
       }
@@ -409,12 +402,10 @@
 int gfits_distribute_table_gzp2_alt (FTable *table, TableField *field, char *raw, int row_start, int Nrows) {
   
-  off_t i, j, k;
-  
   // we are copying NN rows into the column which starts at XX and has MM bytes per row
   
   off_t Nx = table->header->Naxis[0];
   
-  for (k = 0; k < field->pixsize; k++) {
-    for (i = 0; i < Nrows; i++) {
+  for (off_t k = 0; k < field->pixsize; k++) {
+    for (off_t i = 0; i < Nrows; i++) {
       int row = row_start + i;
       char *rawptr = &raw[i*field->Nvalues + k*Nrows*field->Nvalues];
@@ -424,5 +415,5 @@
       char *tblptr = &table->buffer[Nx*row + field->offset + k];
 # endif
-      for (j = 0; j < field->Nvalues; j++, tblptr += field->pixsize, rawptr++) {
+      for (off_t j = 0; j < field->Nvalues; j++, tblptr += field->pixsize, rawptr++) {
 	*tblptr = *rawptr;
       }
Index: trunk/Ohana/src/libfits/table/F_write_T.c
===================================================================
--- trunk/Ohana/src/libfits/table/F_write_T.c	(revision 39455)
+++ trunk/Ohana/src/libfits/table/F_write_T.c	(revision 39457)
@@ -27,5 +27,5 @@
     myAssert (myBlock->startblock == OHANA_MEMMAGIC, "bad memory");
     myAssert (myBlock->endblock == OHANA_MEMMAGIC, "bad memory");
-    myAssert (myBlock->size >= table[0].datasize, "overflow");
+    myAssert (myBlock->size >= (size_t) table[0].datasize, "overflow");
   }
 # endif
Index: trunk/Ohana/src/libfits/table/F_write_TH.c
===================================================================
--- trunk/Ohana/src/libfits/table/F_write_TH.c	(revision 39455)
+++ trunk/Ohana/src/libfits/table/F_write_TH.c	(revision 39457)
@@ -27,5 +27,5 @@
     myAssert (myBlock->startblock == OHANA_MEMMAGIC, "bad memory");
     myAssert (myBlock->endblock == OHANA_MEMMAGIC, "bad memory");
-    myAssert (myBlock->size >= header[0].datasize, "overflow");
+    myAssert (myBlock->size >= (size_t) header[0].datasize, "overflow");
   }
 # endif
Index: trunk/Ohana/src/libfits/test/imagecomp.c
===================================================================
--- trunk/Ohana/src/libfits/test/imagecomp.c	(revision 39455)
+++ trunk/Ohana/src/libfits/test/imagecomp.c	(revision 39457)
@@ -17,5 +17,5 @@
 static int NY = 10;
 
-int main (int argc, char **argv) {
+int main (void) {
   
   plan_tests (3*3*234);
@@ -196,6 +196,6 @@
   }     
 
-  int Ztile[2] = {NX, NY};
-  ok (gfits_compress_image (&rawheader, &rawmatrix, &ftable, (int *) &Ztile, zcmptype), "compressed image");
+  unsigned long int Ztile[2] = {NX, NY};
+  ok (gfits_compress_image (&rawheader, &rawmatrix, &ftable, (unsigned long int *) &Ztile, zcmptype), "compressed image");
   // ok (gfits_compress_image (&rawheader, &rawmatrix, &ftable, NULL, zcmptype), "compressed image");
   ok (gfits_uncompress_image (&outheader, &outmatrix, &ftable), "uncompressed image");
Index: trunk/Ohana/src/libfits/test/keywords.c
===================================================================
--- trunk/Ohana/src/libfits/test/keywords.c	(revision 39455)
+++ trunk/Ohana/src/libfits/test/keywords.c	(revision 39457)
@@ -15,5 +15,5 @@
   tmp = Pout[3]; Pout[3] = Pout[4]; Pout[4] = tmp; }
 
-int main (int argc, char **argv) {
+int main (void) {
   
   plan_tests (14);
@@ -21,7 +21,4 @@
   diag ("libfits keyword tests");
 
-  int i, err;
-  double srcbuf[NSRC], tgtbuf[NTGT], outbuf[NOUT];
-  
   { 
     
@@ -96,6 +93,7 @@
     ptr = gfits_header_field (&header, "END", 1); ok (ptr, "END still good");
 
-    ok (gfits_modify (&header, "D_LONG3", "%Ld", 1, (long long) 0x100), "wrote a keyword");
-    ptr = gfits_header_field (&header, "END", 1); ok (ptr, "END still good");
+    // this is not ISO C99:
+    // ok (gfits_modify (&header, "D_LONG3", "%Ld", 1, (long long) 0x100), "wrote a keyword");
+    // ptr = gfits_header_field (&header, "END", 1); ok (ptr, "END still good");
 
     // set one of each of the few numerical types (unsigned ints)
@@ -109,6 +107,6 @@
     ptr = gfits_header_field (&header, "END", 1); ok (ptr, "END still good");
 
-    ok (gfits_modify (&header, "DU_LONG3", "%Lu", 1, (long long) 0x100), "wrote a keyword");
-    ptr = gfits_header_field (&header, "END", 1); ok (ptr, "END still good");
+    // ok (gfits_modify (&header, "DU_LONG3", "%Lu", 1, (long long) 0x100), "wrote a keyword");
+    // ptr = gfits_header_field (&header, "END", 1); ok (ptr, "END still good");
 
     ok (gfits_modify (&header, "D_SHORT", "%hd", 1, 0x20), "wrote a keyword");
@@ -229,7 +227,7 @@
     ptr = gfits_header_field (&header, "END", 1); ok (ptr, "END still good");
 
-    ok (gfits_scan (&header, "D_LONG3", "%Ld", 1, &Kvalue), "read a keyword");
-    ok (Kvalue == 0x100, "got the right value");
-    ptr = gfits_header_field (&header, "END", 1); ok (ptr, "END still good");
+    // ok (gfits_scan (&header, "D_LONG3", "%Ld", 1, &Kvalue), "read a keyword");
+    // ok (Kvalue == 0x100, "got the right value");
+    // ptr = gfits_header_field (&header, "END", 1); ok (ptr, "END still good");
 
     // set one of each of the few numerical types (unsigned ints)
@@ -246,7 +244,7 @@
     ptr = gfits_header_field (&header, "END", 1); ok (ptr, "END still good");
 
-    ok (gfits_scan (&header, "DU_LONG3", "%Lu", 1, &Ulonglong), "read a keyword");
-    ok (Ulonglong == 0x100, "got the right value");
-    ptr = gfits_header_field (&header, "END", 1); ok (ptr, "END still good");
+    // ok (gfits_scan (&header, "DU_LONG3", "%Lu", 1, &Ulonglong), "read a keyword");
+    // ok (Ulonglong == 0x100, "got the right value");
+    // ptr = gfits_header_field (&header, "END", 1); ok (ptr, "END still good");
 
     ok (gfits_scan (&header, "D_SHORT", "%hd", 1, &Ishort), "read a keyword");
Index: trunk/Ohana/src/libfits/test/ricetest.c
===================================================================
--- trunk/Ohana/src/libfits/test/ricetest.c	(revision 39455)
+++ trunk/Ohana/src/libfits/test/ricetest.c	(revision 39457)
@@ -1,4 +1,5 @@
 # include <ohana.h>
 # include <gfitsio.h>
+# include <gfits_compress.h>
 # include "tap_ohana.h"
 
@@ -6,5 +7,5 @@
 # define NBYTE 4*NPIX
 
-int main (int argc, char **argv) {
+int main (void) {
   
   plan_tests (45);
@@ -12,12 +13,11 @@
   diag ("libfits ricetest.c tests");
 
-  // buffers to store max array
-  char rawdata[NBYTE];
-  char cmpdata[NBYTE];
-  char outdata[NBYTE];
-
   // ok (1, "failure");
 
   if (1) { 
+    // buffers to store max array
+    char rawdata[NBYTE];
+    unsigned char outdata[NBYTE];
+    unsigned char cmpdata[NBYTE];
     char *rawvalue = (char *) rawdata;
     char *outvalue = (char *) outdata;
@@ -46,4 +46,9 @@
 
   if (1) { 
+    // buffers to store max array
+    char rawdata[NBYTE];
+    unsigned short outdata[NBYTE];
+    unsigned char cmpdata[NBYTE];
+
     short *rawvalue = (short *) rawdata;
     short *outvalue = (short *) outdata;
@@ -72,4 +77,9 @@
 
   if (1) { 
+    // buffers to store max array
+    char rawdata[NBYTE];
+    unsigned int outdata[NBYTE];
+    unsigned char cmpdata[NBYTE];
+
     int *rawvalue = (int *) rawdata;
     int *outvalue = (int *) outdata;
Index: trunk/Ohana/src/libfits/test/tablecomp.c
===================================================================
--- trunk/Ohana/src/libfits/test/tablecomp.c	(revision 39455)
+++ trunk/Ohana/src/libfits/test/tablecomp.c	(revision 39457)
@@ -10,7 +10,7 @@
 char *cmptype[] = {"NONE", "NONE_1", "NONE_2", "GZIP_1", "GZIP_2", "RICE_1", "RICE_ONE", "AUTO", NULL};
 
-int main (int argc, char **argv) {
-  
-  plan_tests (668);
+int main (void) {
+  
+  plan_tests (668+428);
 
   diag ("libfits tablecomp.c tests");
@@ -28,4 +28,5 @@
     test_compress_empty (cmptype[i]);
     ok (ohana_memcheck (TRUE), "no memory corruption");
+    ohana_memdump (TRUE);
   }
 
@@ -89,4 +90,145 @@
     ok (gfits_compress_table (&ftable, &cmptable, 10, zcmptype), "compressed table");
 
+    if (0) { int ix, iy;
+      for (ix = 0; ix < 12; ix++) {
+	for (iy = 0; iy < 16; iy++) { 
+	  fprintf (stderr, "%x ", (int) cmptable.buffer[ix*16 + iy]);
+	}
+      }
+    }
+
+    Header rawheader;
+    FTable rawtable;
+    rawtable.header = &rawheader;
+    ok (gfits_uncompress_table (&cmptable, &rawtable), "uncompressed table");
+
+    gfits_free_header (&cmpheader);
+    gfits_free_table (&cmptable);
+
+    outheader = &rawheader;
+    outtable  = &rawtable;
+  }
+
+  char type[16];
+  int Ncol;
+  off_t Nrow;
+
+  char    *VAL_B_t = gfits_get_bintable_column_data (outheader, outtable, "VAL_B", type, &Nrow, &Ncol); ok (!strcmp (type, "byte"),    "read byte    table column"); ok (Nrow == Nval, "right number of rows"); ok (Ncol == 1, "right number of cols");
+  short   *VAL_I_t = gfits_get_bintable_column_data (outheader, outtable, "VAL_I", type, &Nrow, &Ncol); ok (!strcmp (type, "short"),   "read short   table column"); ok (Nrow == Nval, "right number of rows"); ok (Ncol == 1, "right number of cols");
+  int     *VAL_J_t = gfits_get_bintable_column_data (outheader, outtable, "VAL_J", type, &Nrow, &Ncol); ok (!strcmp (type, "int"),     "read int     table column"); ok (Nrow == Nval, "right number of rows"); ok (Ncol == 1, "right number of cols");
+  int64_t *VAL_K_t = gfits_get_bintable_column_data (outheader, outtable, "VAL_K", type, &Nrow, &Ncol); ok (!strcmp (type, "int64_t"), "read int64_t table column"); ok (Nrow == Nval, "right number of rows"); ok (Ncol == 1, "right number of cols");
+  float   *VAL_E_t = gfits_get_bintable_column_data (outheader, outtable, "VAL_E", type, &Nrow, &Ncol); ok (!strcmp (type, "float"),   "read float   table column"); ok (Nrow == Nval, "right number of rows"); ok (Ncol == 1, "right number of cols");
+  double  *VAL_D_t = gfits_get_bintable_column_data (outheader, outtable, "VAL_D", type, &Nrow, &Ncol); ok (!strcmp (type, "double"),  "read double  table column"); ok (Nrow == Nval, "right number of rows"); ok (Ncol == 1, "right number of cols");
+
+  // count mismatched values
+  int NVAL_B_bad = 0;
+  int NVAL_I_bad = 0;
+  int NVAL_J_bad = 0;
+  int NVAL_K_bad = 0;
+  int NVAL_E_bad = 0;
+  int NVAL_D_bad = 0;
+
+  // for (i = 0; i < Nval; i++) {
+  //   fprintf (stderr, "%0llx : %0llx\n", (long long) VAL_K[i], (long long) VAL_K_t[i]);
+  // }
+
+  for (i = 0; i < Nval; i++) {
+    if (VAL_B[i] != VAL_B_t[i]) NVAL_B_bad++;
+    if (VAL_I[i] != VAL_I_t[i]) NVAL_I_bad++;
+    if (VAL_J[i] != VAL_J_t[i]) NVAL_J_bad++;
+    if (VAL_K[i] != VAL_K_t[i]) NVAL_K_bad++;
+    if (VAL_E[i] != VAL_E_t[i]) NVAL_E_bad++;
+    if (VAL_D[i] != VAL_D_t[i]) NVAL_D_bad++;
+  }
+
+  ok (!NVAL_B_bad, "byte    values match (input vs output)");
+  ok (!NVAL_I_bad, "short   values match (input vs output)");
+  ok (!NVAL_J_bad, "int     values match (input vs output)");
+  ok (!NVAL_K_bad, "int64_t values match (input vs output)");
+  ok (!NVAL_E_bad, "float   values match (input vs output)");
+  ok (!NVAL_D_bad, "double  values match (input vs output)");
+
+  free (VAL_B);
+  free (VAL_I);
+  free (VAL_J);
+  free (VAL_K);
+  free (VAL_E);
+  free (VAL_D);
+
+  free (VAL_B_t);
+  free (VAL_I_t);
+  free (VAL_J_t);
+  free (VAL_K_t);
+  free (VAL_E_t);
+  free (VAL_D_t);
+
+  gfits_free_header (&header);
+  gfits_free_table (&ftable);
+  if (zcmptype) {
+    gfits_free_header (outheader);
+    gfits_free_table (outtable);
+  }
+  return TRUE;
+}
+
+int test_compress_fullrange (char *zcmptype) { // test 2: make a table, compress, uncompress, compare : use compression "NONE"
+
+  Header header;
+  FTable ftable;
+
+  diag ("--- starting test_compress with zcmptype %s ---", zcmptype);
+  ok (gfits_init_header (&header), "inited the header");
+  ok (gfits_init_table (&ftable), "inited the table");
+
+  ok (gfits_create_table_header (&header, "BINTABLE", "TESTDATA"), "created the table header");
+
+  ok (gfits_define_bintable_column (&header, "B", "VAL_B", "byte",   "none", 1.0, 0.0), "defined byte column");
+  ok (gfits_define_bintable_column (&header, "I", "VAL_I", "short",  "none", 1.0, 0.0), "defined short column");
+  ok (gfits_define_bintable_column (&header, "J", "VAL_J", "int",    "none", 1.0, 0.0),  "defined int column");
+  ok (gfits_define_bintable_column (&header, "K", "VAL_K", "long",   "none", 1.0, 0.0),  "defined long column");
+  ok (gfits_define_bintable_column (&header, "E", "VAL_E", "float",  "degree", 1.0, 0.0),   "defined float column");
+  ok (gfits_define_bintable_column (&header, "D", "VAL_D", "double", "degree", 1.0, 0.0),   "defined double column");
+  
+  // generate the output array that carries the data
+  ok (gfits_create_table (&header, &ftable), "created the basic table");
+
+  int Nval = 1000;
+  char    *VAL_B;  ALLOCATE (VAL_B, char,    Nval);
+  short   *VAL_I;  ALLOCATE (VAL_I, short,   Nval);
+  int     *VAL_J;  ALLOCATE (VAL_J, int,     Nval);
+  int64_t *VAL_K;  ALLOCATE (VAL_K, int64_t, Nval);
+  float   *VAL_E;  ALLOCATE (VAL_E, float,   Nval);
+  double  *VAL_D;  ALLOCATE (VAL_D, double,  Nval);
+  
+  long A = time(NULL);
+  srand48(A);
+
+  int i;
+  for (i = 0; i < Nval; i++) {
+    VAL_B[i] =       0xff & lrand48();
+    VAL_I[i] =     0xffff & lrand48();
+    VAL_J[i] = 0xffffffff & lrand48();
+    VAL_K[i] = (((int64_t)lrand48()) << 32) + (int64_t)lrand48();
+    VAL_E[i] = FLT_MAX * (2.0*drand48() - 1.0);
+    VAL_D[i] = DBL_MAX * (2.0*drand48() - 1.0);
+  }     
+
+  // add the columns to the output array
+  ok (gfits_set_bintable_column (&header, &ftable, "VAL_B", VAL_B, Nval), "set byte   table column");
+  ok (gfits_set_bintable_column (&header, &ftable, "VAL_I", VAL_I, Nval), "set short  table column");
+  ok (gfits_set_bintable_column (&header, &ftable, "VAL_J", VAL_J, Nval), "set int    table column");
+  ok (gfits_set_bintable_column (&header, &ftable, "VAL_K", VAL_K, Nval), "set long   table column");
+  ok (gfits_set_bintable_column (&header, &ftable, "VAL_E", VAL_E, Nval), "set float  table column");
+  ok (gfits_set_bintable_column (&header, &ftable, "VAL_D", VAL_D, Nval), "set double table column");
+
+  Header *outheader = &header;
+  FTable *outtable = &ftable;
+
+  if (zcmptype) {
+    Header cmpheader;
+    FTable cmptable;
+    cmptable.header = &cmpheader;
+    ok (gfits_compress_table (&ftable, &cmptable, 10, zcmptype), "compressed table");
+
     Header rawheader;
     FTable rawtable;
@@ -120,8 +262,4 @@
   int NVAL_D_bad = 0;
 
-  // for (i = 0; i < Nval; i++) {
-  //   fprintf (stderr, "%0llx : %0llx\n", (long long) VAL_K[i], (long long) VAL_K_t[i]);
-  // }
-
   for (i = 0; i < Nval; i++) {
     if (VAL_B[i] != VAL_B_t[i]) NVAL_B_bad++;
@@ -140,4 +278,18 @@
   ok (!NVAL_D_bad, "double  values match (input vs output)");
 
+  free (VAL_B);
+  free (VAL_I);
+  free (VAL_J);
+  free (VAL_K);
+  free (VAL_E);
+  free (VAL_D);
+
+  free (VAL_B_t);
+  free (VAL_I_t);
+  free (VAL_J_t);
+  free (VAL_K_t);
+  free (VAL_E_t);
+  free (VAL_D_t);
+
   gfits_free_header (&header);
   gfits_free_table (&ftable);
@@ -149,5 +301,76 @@
 }
 
-int test_compress_fullrange (char *zcmptype) { // test 2: make a table, compress, uncompress, compare : use compression "NONE"
+int test_compress_single_full (char *zcmptype) { // test 2: make a table, compress, uncompress, compare : use compression "NONE"
+
+  Header header;
+  FTable ftable;
+
+  diag ("--- starting test_compress with zcmptype %s ---", zcmptype);
+  ok (gfits_init_header (&header), "inited the header");
+  ok (gfits_init_table (&ftable), "inited the table");
+
+  ok (gfits_create_table_header (&header, "BINTABLE", "TESTDATA"), "created the table header");
+
+  ok (gfits_define_bintable_column (&header, "I", "SEQ", "seq", "none", 1.0, 0.0), "defined short column");
+  
+  // generate the output array that carries the data
+  ok (gfits_create_table (&header, &ftable), "created the basic table");
+
+  int Nval = 1000;
+  short *SEQ;  ALLOCATE (SEQ, short,  Nval);
+  
+  int i;
+  for (i = 0; i < Nval; i++) {
+    SEQ[i] = i;
+  }     
+
+  // add the columns to the output array
+  ok (gfits_set_bintable_column (&header, &ftable, "SEQ", SEQ, Nval), "set short  table column");
+
+  Header *outheader = &header;
+  FTable *outtable = &ftable;
+
+  if (zcmptype) {
+    Header cmpheader;
+    FTable cmptable;
+    cmptable.header = &cmpheader;
+    ok (gfits_compress_table (&ftable, &cmptable, 0, zcmptype), "compressed table");
+
+    Header rawheader;
+    FTable rawtable;
+    rawtable.header = &rawheader;
+    ok (gfits_uncompress_table (&cmptable, &rawtable), "uncompressed table");
+    
+    gfits_free_header (&cmpheader);
+    gfits_free_table (&cmptable);
+
+    outheader = &rawheader;
+    outtable  = &rawtable;
+  }
+
+  char type[16];
+  int Ncol;
+  off_t Nrow;
+
+  short  *SEQ_t = gfits_get_bintable_column_data (outheader, outtable, "SEQ", type, &Nrow, &Ncol); ok (!strcmp (type, "short"),  "read short  table column"); ok (Nrow == Nval, "right number of rows"); ok (Ncol == 1, "right number of cols");
+
+  // count mismatched values
+  int Nseq = 0;
+  for (i = 0; i < Nval; i++) {
+    if (SEQ[i] != SEQ_t[i]) Nseq++;
+  }
+
+  ok (!Nseq,   "short  values match (input vs output)");
+
+  gfits_free_header (&header);
+  gfits_free_table (&ftable);
+  if (zcmptype) {
+    gfits_free_header (outheader);
+    gfits_free_table (outtable);
+  }
+  return TRUE;
+}
+
+int test_compress_empty (char *zcmptype) { // test 2: make a table, compress, uncompress, compare : use compression "NONE"
 
   Header header;
@@ -170,5 +393,5 @@
   ok (gfits_create_table (&header, &ftable), "created the basic table");
 
-  int Nval = 1000;
+  int Nval = 0;
   char    *VAL_B;  ALLOCATE (VAL_B, char,    Nval);
   short   *VAL_I;  ALLOCATE (VAL_I, short,   Nval);
@@ -178,15 +401,12 @@
   double  *VAL_D;  ALLOCATE (VAL_D, double,  Nval);
   
-  long A = time(NULL);
-  srand48(A);
-
   int i;
   for (i = 0; i < Nval; i++) {
-    VAL_B[i] =       0xff & lrand48();
-    VAL_I[i] =     0xffff & lrand48();
-    VAL_J[i] = 0xffffffff & lrand48();
-    VAL_K[i] = (((int64_t)lrand48()) << 32) + (int64_t)lrand48();
-    VAL_E[i] = FLT_MAX * (2.0*drand48() - 1.0);
-    VAL_D[i] = DBL_MAX * (2.0*drand48() - 1.0);
+    VAL_B[i] = (i % 255) - 128;
+    VAL_I[i] = i;
+    VAL_J[i] = 10000*i + 100*i;
+    VAL_K[i] = 10000*i + 330*i;
+    VAL_E[i] = 0.1*i;
+    VAL_D[i] = 1.001*i;
   }     
 
@@ -206,5 +426,5 @@
     FTable cmptable;
     cmptable.header = &cmpheader;
-    ok (gfits_compress_table (&ftable, &cmptable, 10, zcmptype), "compressed table");
+    ok (gfits_compress_table (&ftable, &cmptable, 0, zcmptype), "compressed table");
 
     Header rawheader;
@@ -239,4 +459,8 @@
   int NVAL_D_bad = 0;
 
+  // for (i = 0; i < Nval; i++) {
+  //   fprintf (stderr, "%0llx : %0llx\n", (long long) VAL_K[i], (long long) VAL_K_t[i]);
+  // }
+
   for (i = 0; i < Nval; i++) {
     if (VAL_B[i] != VAL_B_t[i]) NVAL_B_bad++;
@@ -255,4 +479,18 @@
   ok (!NVAL_D_bad, "double  values match (input vs output)");
 
+  free (VAL_B);
+  free (VAL_I);
+  free (VAL_J);
+  free (VAL_K);
+  free (VAL_E);
+  free (VAL_D);
+
+  free (VAL_B_t);
+  free (VAL_I_t);
+  free (VAL_J_t);
+  free (VAL_K_t);
+  free (VAL_E_t);
+  free (VAL_D_t);
+
   gfits_free_header (&header);
   gfits_free_table (&ftable);
@@ -264,190 +502,3 @@
 }
 
-int test_compress_single_full (char *zcmptype) { // test 2: make a table, compress, uncompress, compare : use compression "NONE"
-
-  Header header;
-  FTable ftable;
-
-  diag ("--- starting test_compress with zcmptype %s ---", zcmptype);
-  ok (gfits_init_header (&header), "inited the header");
-  ok (gfits_init_table (&ftable), "inited the table");
-
-  ok (gfits_create_table_header (&header, "BINTABLE", "TESTDATA"), "created the table header");
-
-  ok (gfits_define_bintable_column (&header, "I", "SEQ", "seq", "none", 1.0, 0.0), "defined short column");
-  
-  // generate the output array that carries the data
-  ok (gfits_create_table (&header, &ftable), "created the basic table");
-
-  int Nval = 1000;
-  short *SEQ;  ALLOCATE (SEQ, short,  Nval);
-  
-  int i;
-  for (i = 0; i < Nval; i++) {
-    SEQ[i] = i;
-  }     
-
-  // add the columns to the output array
-  ok (gfits_set_bintable_column (&header, &ftable, "SEQ", SEQ, Nval), "set short  table column");
-
-  Header *outheader = &header;
-  FTable *outtable = &ftable;
-
-  if (zcmptype) {
-    Header cmpheader;
-    FTable cmptable;
-    cmptable.header = &cmpheader;
-    ok (gfits_compress_table (&ftable, &cmptable, 0, zcmptype), "compressed table");
-
-    Header rawheader;
-    FTable rawtable;
-    rawtable.header = &rawheader;
-    ok (gfits_uncompress_table (&cmptable, &rawtable), "uncompressed table");
-    
-    gfits_free_header (&cmpheader);
-    gfits_free_table (&cmptable);
-
-    outheader = &rawheader;
-    outtable  = &rawtable;
-  }
-
-  char type[16];
-  int Ncol;
-  off_t Nrow;
-
-  short  *SEQ_t = gfits_get_bintable_column_data (outheader, outtable, "SEQ", type, &Nrow, &Ncol); ok (!strcmp (type, "short"),  "read short  table column"); ok (Nrow == Nval, "right number of rows"); ok (Ncol == 1, "right number of cols");
-
-  // count mismatched values
-  int Nseq = 0;
-  for (i = 0; i < Nval; i++) {
-    if (SEQ[i] != SEQ_t[i]) Nseq++;
-  }
-
-  ok (!Nseq,   "short  values match (input vs output)");
-
-  gfits_free_header (&header);
-  gfits_free_table (&ftable);
-  if (zcmptype) {
-    gfits_free_header (outheader);
-    gfits_free_table (outtable);
-  }
-  return TRUE;
-}
-
-int test_compress_empty (char *zcmptype) { // test 2: make a table, compress, uncompress, compare : use compression "NONE"
-
-  Header header;
-  FTable ftable;
-
-  diag ("--- starting test_compress with zcmptype %s ---", zcmptype);
-  ok (gfits_init_header (&header), "inited the header");
-  ok (gfits_init_table (&ftable), "inited the table");
-
-  ok (gfits_create_table_header (&header, "BINTABLE", "TESTDATA"), "created the table header");
-
-  ok (gfits_define_bintable_column (&header, "B", "VAL_B", "byte",   "none", 1.0, 0.0), "defined byte column");
-  ok (gfits_define_bintable_column (&header, "I", "VAL_I", "short",  "none", 1.0, 0.0), "defined short column");
-  ok (gfits_define_bintable_column (&header, "J", "VAL_J", "int",    "none", 1.0, 0.0),  "defined int column");
-  ok (gfits_define_bintable_column (&header, "K", "VAL_K", "long",   "none", 1.0, 0.0),  "defined long column");
-  ok (gfits_define_bintable_column (&header, "E", "VAL_E", "float",  "degree", 1.0, 0.0),   "defined float column");
-  ok (gfits_define_bintable_column (&header, "D", "VAL_D", "double", "degree", 1.0, 0.0),   "defined double column");
-  
-  // generate the output array that carries the data
-  ok (gfits_create_table (&header, &ftable), "created the basic table");
-
-  int Nval = 0;
-  char    *VAL_B;  ALLOCATE (VAL_B, char,    Nval);
-  short   *VAL_I;  ALLOCATE (VAL_I, short,   Nval);
-  int     *VAL_J;  ALLOCATE (VAL_J, int,     Nval);
-  int64_t *VAL_K;  ALLOCATE (VAL_K, int64_t, Nval);
-  float   *VAL_E;  ALLOCATE (VAL_E, float,   Nval);
-  double  *VAL_D;  ALLOCATE (VAL_D, double,  Nval);
-  
-  int i;
-  for (i = 0; i < Nval; i++) {
-    VAL_B[i] = (i % 255) - 128;
-    VAL_I[i] = i;
-    VAL_J[i] = 10000*i + 100*i;
-    VAL_K[i] = 10000*i + 330*i;
-    VAL_E[i] = 0.1*i;
-    VAL_D[i] = 1.001*i;
-  }     
-
-  // add the columns to the output array
-  ok (gfits_set_bintable_column (&header, &ftable, "VAL_B", VAL_B, Nval), "set byte   table column");
-  ok (gfits_set_bintable_column (&header, &ftable, "VAL_I", VAL_I, Nval), "set short  table column");
-  ok (gfits_set_bintable_column (&header, &ftable, "VAL_J", VAL_J, Nval), "set int    table column");
-  ok (gfits_set_bintable_column (&header, &ftable, "VAL_K", VAL_K, Nval), "set long   table column");
-  ok (gfits_set_bintable_column (&header, &ftable, "VAL_E", VAL_E, Nval), "set float  table column");
-  ok (gfits_set_bintable_column (&header, &ftable, "VAL_D", VAL_D, Nval), "set double table column");
-
-  Header *outheader = &header;
-  FTable *outtable = &ftable;
-
-  if (zcmptype) {
-    Header cmpheader;
-    FTable cmptable;
-    cmptable.header = &cmpheader;
-    ok (gfits_compress_table (&ftable, &cmptable, 0, zcmptype), "compressed table");
-
-    Header rawheader;
-    FTable rawtable;
-    rawtable.header = &rawheader;
-    ok (gfits_uncompress_table (&cmptable, &rawtable), "uncompressed table");
-    
-    gfits_free_header (&cmpheader);
-    gfits_free_table (&cmptable);
-
-    outheader = &rawheader;
-    outtable  = &rawtable;
-  }
-
-  char type[16];
-  int Ncol;
-  off_t Nrow;
-
-  char    *VAL_B_t = gfits_get_bintable_column_data (outheader, outtable, "VAL_B", type, &Nrow, &Ncol); ok (!strcmp (type, "byte"),    "read byte    table column"); ok (Nrow == Nval, "right number of rows"); ok (Ncol == 1, "right number of cols");
-  short   *VAL_I_t = gfits_get_bintable_column_data (outheader, outtable, "VAL_I", type, &Nrow, &Ncol); ok (!strcmp (type, "short"),   "read short   table column"); ok (Nrow == Nval, "right number of rows"); ok (Ncol == 1, "right number of cols");
-  int     *VAL_J_t = gfits_get_bintable_column_data (outheader, outtable, "VAL_J", type, &Nrow, &Ncol); ok (!strcmp (type, "int"),     "read int     table column"); ok (Nrow == Nval, "right number of rows"); ok (Ncol == 1, "right number of cols");
-  int64_t *VAL_K_t = gfits_get_bintable_column_data (outheader, outtable, "VAL_K", type, &Nrow, &Ncol); ok (!strcmp (type, "int64_t"), "read int64_t table column"); ok (Nrow == Nval, "right number of rows"); ok (Ncol == 1, "right number of cols");
-  float   *VAL_E_t = gfits_get_bintable_column_data (outheader, outtable, "VAL_E", type, &Nrow, &Ncol); ok (!strcmp (type, "float"),   "read float   table column"); ok (Nrow == Nval, "right number of rows"); ok (Ncol == 1, "right number of cols");
-  double  *VAL_D_t = gfits_get_bintable_column_data (outheader, outtable, "VAL_D", type, &Nrow, &Ncol); ok (!strcmp (type, "double"),  "read double  table column"); ok (Nrow == Nval, "right number of rows"); ok (Ncol == 1, "right number of cols");
-
-  // count mismatched values
-  int NVAL_B_bad = 0;
-  int NVAL_I_bad = 0;
-  int NVAL_J_bad = 0;
-  int NVAL_K_bad = 0;
-  int NVAL_E_bad = 0;
-  int NVAL_D_bad = 0;
-
-  // for (i = 0; i < Nval; i++) {
-  //   fprintf (stderr, "%0llx : %0llx\n", (long long) VAL_K[i], (long long) VAL_K_t[i]);
-  // }
-
-  for (i = 0; i < Nval; i++) {
-    if (VAL_B[i] != VAL_B_t[i]) NVAL_B_bad++;
-    if (VAL_I[i] != VAL_I_t[i]) NVAL_I_bad++;
-    if (VAL_J[i] != VAL_J_t[i]) NVAL_J_bad++;
-    if (VAL_K[i] != VAL_K_t[i]) NVAL_K_bad++;
-    if (VAL_E[i] != VAL_E_t[i]) NVAL_E_bad++;
-    if (VAL_D[i] != VAL_D_t[i]) NVAL_D_bad++;
-  }
-
-  ok (!NVAL_B_bad, "byte    values match (input vs output)");
-  ok (!NVAL_I_bad, "short   values match (input vs output)");
-  ok (!NVAL_J_bad, "int     values match (input vs output)");
-  ok (!NVAL_K_bad, "int64_t values match (input vs output)");
-  ok (!NVAL_E_bad, "float   values match (input vs output)");
-  ok (!NVAL_D_bad, "double  values match (input vs output)");
-
-  gfits_free_header (&header);
-  gfits_free_table (&ftable);
-  if (zcmptype) {
-    gfits_free_header (outheader);
-    gfits_free_table (outtable);
-  }
-  return TRUE;
-}
-
-
+
Index: trunk/Ohana/src/libfits/test/zlib.c
===================================================================
--- trunk/Ohana/src/libfits/test/zlib.c	(revision 39455)
+++ trunk/Ohana/src/libfits/test/zlib.c	(revision 39457)
@@ -16,5 +16,5 @@
   tmp = Pout[3]; Pout[3] = Pout[4]; Pout[4] = tmp; }
 
-int main (int argc, char **argv) {
+int main (void) {
   
   plan_tests (14);
@@ -30,7 +30,7 @@
   { 
     z_stream zdn;
-    zdn.next_in = (char *) srcbuf;
+    zdn.next_in = (unsigned char *) srcbuf;
     zdn.avail_in = NSRC * sizeof(double);
-    zdn.next_out = (char *) tgtbuf;
+    zdn.next_out = (unsigned char *) tgtbuf;
     zdn.avail_out = NTGT * sizeof(double);
   
@@ -83,7 +83,7 @@
   {
     z_stream zup;
-    zup.next_in = (char *) tgtbuf;
+    zup.next_in = (unsigned char *) tgtbuf;
     zup.avail_in = NTGT * sizeof(double);
-    zup.next_out = (char *) outbuf;
+    zup.next_out = (unsigned char *) outbuf;
     zup.avail_out = NOUT * sizeof(double);
   
@@ -120,7 +120,7 @@
   { 
     z_stream zdn;
-    zdn.next_in = (char *) srcbuf;
+    zdn.next_in = (unsigned char *) srcbuf;
     zdn.avail_in = NSRC * sizeof(double);
-    zdn.next_out = (char *) tgtbuf;
+    zdn.next_out = (unsigned char *) tgtbuf;
     zdn.avail_out = NTGT * sizeof(double);
   
@@ -174,7 +174,7 @@
   {
     z_stream zup;
-    zup.next_in = (char *) tgtbuf;
+    zup.next_in = (unsigned char *) tgtbuf;
     zup.avail_in = NTGT * sizeof(double);
-    zup.next_out = (char *) outbuf;
+    zup.next_out = (unsigned char *) outbuf;
     zup.avail_out = NOUT * sizeof(double);
   
Index: trunk/Ohana/src/libkapa/rotfont/courier12.h
===================================================================
--- trunk/Ohana/src/libkapa/rotfont/courier12.h	(revision 39455)
+++ trunk/Ohana/src/libkapa/rotfont/courier12.h	(revision 39457)
@@ -63,5 +63,6 @@
 static unsigned char courier12_31_bits[] = {
 0x00};
-static unsigned char courier12_32_bits[] = {};
+static unsigned char courier12_32_bits[] = {
+0x00};
 static unsigned char courier12_33_bits[] = {
 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x02};
Index: trunk/Ohana/src/libkapa/rotfont/courier24.h
===================================================================
--- trunk/Ohana/src/libkapa/rotfont/courier24.h	(revision 39455)
+++ trunk/Ohana/src/libkapa/rotfont/courier24.h	(revision 39457)
@@ -63,5 +63,6 @@
 static unsigned char courier24_31_bits[] = {
 0x00};
-static unsigned char courier24_32_bits[] = {};
+static unsigned char courier24_32_bits[] = {
+0x00};
 static unsigned char courier24_33_bits[] = {
 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x00, 0x00, 0x07, 
Index: trunk/Ohana/src/libkapa/rotfont/courier8.h
===================================================================
--- trunk/Ohana/src/libkapa/rotfont/courier8.h	(revision 39455)
+++ trunk/Ohana/src/libkapa/rotfont/courier8.h	(revision 39457)
@@ -63,5 +63,6 @@
 static unsigned char courier8_31_bits[] = {
 0x00};
-static unsigned char courier8_32_bits[] = {};
+static unsigned char courier8_32_bits[] = {
+0x00};
 static unsigned char courier8_33_bits[] = {
 0x01, 0x01, 0x01, 0x01};
Index: trunk/Ohana/src/libkapa/rotfont/fixed.h
===================================================================
--- trunk/Ohana/src/libkapa/rotfont/fixed.h	(revision 39455)
+++ trunk/Ohana/src/libkapa/rotfont/fixed.h	(revision 39457)
@@ -62,5 +62,6 @@
 static unsigned char fixed_31_bits[] = {
 0x01};
-static unsigned char fixed_32_bits[] = {};
+static unsigned char fixed_32_bits[] = {
+0x00};
 static unsigned char fixed_33_bits[] = {
 0x1, 0x1, 0x1, 0x1, 0x1, 0x0, 0x01};
Index: trunk/Ohana/src/libkapa/src/DrawRotString.c
===================================================================
--- trunk/Ohana/src/libkapa/src/DrawRotString.c	(revision 39455)
+++ trunk/Ohana/src/libkapa/src/DrawRotString.c	(revision 39457)
@@ -36,5 +36,5 @@
   unsigned char *bitmap;
   char *currentname, basename[64]; 
-  int i, dy, dx, N, X, Y, code, protect;
+  int dy, dx, N, X, Y, code, protect;
   int dX, Xoff, dY, Yoff, YoffBase;
   int currentsize, basesize;
@@ -76,4 +76,5 @@
   YoffBase = Yoff;
   /* draw characters one-by-one */
+  unsigned int i;
   for (i = 0; i < strlen(string); i++) {
     N = (int)(string[i]);
@@ -150,5 +151,5 @@
   int ii, jj, byte_line, byte, bit, flag;
   unsigned long int fore;
-  double i, j, cs, sn, rscale, tmp;
+  double ix, iy, cs, sn, rscale, tmp;
   int X, Y, X0, X1, X2, Y0, Y1, Y2, x0, y0;
 
@@ -212,8 +213,8 @@
   XSetForeground (RotDisplay, RotGC, fore);
   if (scale > 1) {
-    for (i = X1; i <= X2; i+=1) {
-      for (j = Y1; j <= Y2; j+=1) {
-	tmp = rscale*(cs*(i - X0) + sn*(j - Y0)) + x0;  ii = NEARINT (tmp);
-	tmp = rscale*(cs*(j - Y0) - sn*(i - X0)) + y0;  jj = NEARINT (tmp);
+    for (ix = X1; ix <= X2; ix += 1) {
+      for (iy = Y1; iy <= Y2; iy += 1) {
+	tmp = rscale*(cs*(ix - X0) + sn*(iy - Y0)) + x0;  ii = NEARINT (tmp);
+	tmp = rscale*(cs*(iy - Y0) - sn*(ix - X0)) + y0;  jj = NEARINT (tmp);
 	/* fprintf (stderr, "%d %d  %d %d\n", i, j, ii, jj);  */
 	if ((ii < 0) || (ii >= dx) || (jj < 0) || (jj >= dy)) continue;
@@ -221,12 +222,12 @@
 	bit = ii % 8;
 	flag = 0x01 & (bitmap[byte] >> bit);
-	if (flag) XDrawPoint (RotDisplay, RotWindow, RotGC, x + i, y + j);
+	if (flag) XDrawPoint (RotDisplay, RotWindow, RotGC, x + ix, y + iy);
       }
     }
   } else {
-    for (i = X1; i <= X2; i+=scale) {
-      for (j = Y1; j <= Y2; j+=scale) {
-	tmp = rscale*(cs*(i - X0) + sn*(j - Y0)) + x0;  ii = NEARINT (tmp);
-	tmp = rscale*(cs*(j - Y0) - sn*(i - X0)) + y0;  jj = NEARINT (tmp);
+    for (ix = X1; ix <= X2; ix+=scale) {
+      for (iy = Y1; iy <= Y2; iy+=scale) {
+	tmp = rscale*(cs*(ix - X0) + sn*(iy - Y0)) + x0;  ii = NEARINT (tmp);
+	tmp = rscale*(cs*(iy - Y0) - sn*(ix - X0)) + y0;  jj = NEARINT (tmp);
 	/* fprintf (stderr, "%d %d  %d %d\n", i, j, ii, jj);  */
 	if ((ii < 0) || (ii >= dx) || (jj < 0) || (jj >= dy)) continue;
@@ -236,18 +237,18 @@
 	/* fprintf (stderr, "%2d %2d  %3d %3d  %1d  %f  %f\n", i, j, ii, jj, flag,
 	   rscale*(cs*(i - X0) + sn*(j - Y0)) + x0, rscale*(cs*(j - Y0) - sn*(i - X0)) + y0);  */
-	if (flag) XDrawPoint (RotDisplay, RotWindow, RotGC, x + i, y + j);
+	if (flag) XDrawPoint (RotDisplay, RotWindow, RotGC, x + ix, y + iy);
       }
     }
 # if (0)
-    for (i = 0; i < dx; i++) {
-      for (j = 0; j < dy; j++) {
-	tmp = scale*(cs*(i - x0) - sn*(j - y0)) + X0; ii = NEARINT (tmp);
-	tmp = scale*(cs*(j - y0) + sn*(i - x0)) + Y0; jj = NEARINT (tmp);
+    for (ix = 0; ix < dx; ix++) {
+      for (iy = 0; iy < dy; iy++) {
+	tmp = scale*(cs*(ix - x0) - sn*(iy - y0)) + X0; ii = NEARINT (tmp);
+	tmp = scale*(cs*(iy - y0) + sn*(ix - x0)) + Y0; jj = NEARINT (tmp);
 	/* if ((ii < 0) || (ii >= dx) || (jj < 0) || (jj >= dy)) continue; */
-	byte = byte_line * j + (i / 8);
-	bit = i % 8;
+	byte = byte_line * iy + (ix / 8);
+	bit = ix % 8;
 	flag = 0x01 & (bitmap[byte] >> bit);
-	fprintf (stderr, "%2d %2d  %3d %3d  %1d  %f  %f\n", i, j, ii, jj, flag, 
-		 scale*(cs*(i - x0) - sn*(j - y0)) + X0, scale*(cs*(j - y0) + sn*(i - x0)) + Y0); 
+	fprintf (stderr, "%2d %2d  %3d %3d  %1d  %f  %f\n", ix, iy, ii, jj, flag, 
+		 scale*(cs*(ix - x0) - sn*(iy - y0)) + X0, scale*(cs*(iy - y0) + sn*(ix - x0)) + Y0); 
 	if (flag) XDrawPoint (RotDisplay, RotWindow, RotGC, x + ii, y + jj);
       }
Index: trunk/Ohana/src/libkapa/src/KapaOpen.c
===================================================================
--- trunk/Ohana/src/libkapa/src/KapaOpen.c	(revision 39455)
+++ trunk/Ohana/src/libkapa/src/KapaOpen.c	(revision 39457)
@@ -10,5 +10,5 @@
 
 static int Nvalid = 0;
-static int *VALID = NULL;
+static u_int32_t *VALID = NULL;
 
 int KapaLaunchCommand (char *line);
@@ -146,8 +146,8 @@
   if (Nvalid == 0) {
     Nvalid = 1;
-    ALLOCATE (VALID, int, Nvalid);
+    ALLOCATE (VALID, u_int32_t, Nvalid);
   } else {
     Nvalid ++;
-    REALLOCATE (VALID, int, Nvalid);
+    REALLOCATE (VALID, u_int32_t, Nvalid);
   }
 
Index: trunk/Ohana/src/libkapa/src/PSRotFont.c
===================================================================
--- trunk/Ohana/src/libkapa/src/PSRotFont.c	(revision 39455)
+++ trunk/Ohana/src/libkapa/src/PSRotFont.c	(revision 39457)
@@ -7,5 +7,5 @@
 
   char *segment, basename[64], *currentname;
-  int i, N, code, protect;
+  int N, code, protect;
   int dX, dY, Xoff, Yoff, X, Y, Nseg, NSEG, YoffBase;
   double cs, sn, currentscale;
@@ -78,4 +78,6 @@
   YoffBase = 0;
   /* accumulate string segments with common state */
+
+  unsigned int i;
   for (i = 0; i < strlen (string); i++) {
     N = (int)(string[i]);
@@ -198,5 +200,5 @@
 int PSRotStrlen (char *c) {
 
-  int i, N, dX, code;
+  int N, dX, code;
   double currentscale, scale; 
 
@@ -208,4 +210,6 @@
 
   code = FALSE;
+
+  unsigned int i;
   for (i = 0; i < strlen (c); i++) {
     N = (int)(c[i]);
Index: trunk/Ohana/src/libkapa/src/RotFont.c
===================================================================
--- trunk/Ohana/src/libkapa/src/RotFont.c	(revision 39455)
+++ trunk/Ohana/src/libkapa/src/RotFont.c	(revision 39457)
@@ -95,5 +95,5 @@
 int RotStrlen (char *c) {
 
-  int i, N, dX, code;
+  int N, dX, code;
   double scale; 
   
@@ -106,4 +106,6 @@
 
   code = FALSE;
+
+  unsigned int i;
   for (i = 0; i < strlen (c); i++) {
     N = (int)(c[i]);
Index: trunk/Ohana/src/libkapa/src/bDrawRotFont.c
===================================================================
--- trunk/Ohana/src/libkapa/src/bDrawRotFont.c	(revision 39455)
+++ trunk/Ohana/src/libkapa/src/bDrawRotFont.c	(revision 39457)
@@ -14,5 +14,5 @@
   unsigned char *bitmap;
   char *currentname, basename[64]; 
-  int i, dy, dx, N, X, Y, code, protect;
+  int dy, dx, N, X, Y, code, protect;
   int dX, Xoff, dY, Yoff, YoffBase;
   int currentsize, basesize;
@@ -57,4 +57,6 @@
   YoffBase = Yoff;
   /* draw characters one-by-one */
+
+  unsigned int i;
   for (i = 0; i < strlen(string); i++) {
     N = (int)(string[i]);
@@ -125,4 +127,5 @@
 
 int bDrawRotBitmap (bDrawBuffer *buffer, int x, int y, int dx, int dy, unsigned char *bitmap, int mode, double angle, double scale) {
+  OHANA_UNUSED_PARAM(mode);
 
   int ii, jj, byte_line, byte, bit, flag;
Index: trunk/Ohana/src/libohana/include/ohana.h
===================================================================
--- trunk/Ohana/src/libohana/include/ohana.h	(revision 39455)
+++ trunk/Ohana/src/libohana/include/ohana.h	(revision 39457)
@@ -400,5 +400,5 @@
 int     write_fmt              PROTO((int fd, char *format, ...)) OHANA_FORMAT(printf, 2, 3);
 
-char   **isolate_elements      PROTO((int argc, char **argv, int *nstack));
+char   **isolate_elements      PROTO((unsigned int argc, char **argv, unsigned int *nstack));
 
 // functions used to manage "last error message"
@@ -486,6 +486,6 @@
 int ohana_bisection_double (double *values, int Nvalues, double threshold);
 
-int sprintf_float (char *output, float value);
-int sprintf_double (char *output, double value);
+unsigned int sprintf_float (char *output, float value);
+unsigned int sprintf_double (char *output, double value);
 
 /* in gaussdev.c */
Index: trunk/Ohana/src/libohana/include/ohana_allocate.h
===================================================================
--- trunk/Ohana/src/libohana/include/ohana_allocate.h	(revision 39455)
+++ trunk/Ohana/src/libohana/include/ohana_allocate.h	(revision 39457)
@@ -13,5 +13,5 @@
   int line;		      // line (re)allocated
   int freed;		      // memory has been freed
-  int dummy;		      // need to put endblock on the endpost
+  int Nalloc;		      // need to put endblock on the endpost
   uint32_t endblock;	      // endpost marker
 } OhanaMemblock;
Index: trunk/Ohana/src/libohana/src/Fread.c
===================================================================
--- trunk/Ohana/src/libohana/src/Fread.c	(revision 39455)
+++ trunk/Ohana/src/libohana/src/Fread.c	(revision 39457)
@@ -44,6 +44,13 @@
 
 static int ByteSwap (char *ptr, off_t size, off_t nitems, char *type) {
+  OHANA_UNUSED_PARAM(size);
 
-# ifdef BYTE_SWAP
+# ifndef BYTE_SWAP
+  OHANA_UNUSED_PARAM(ptr);
+  OHANA_UNUSED_PARAM(nitems);
+  OHANA_UNUSED_PARAM(type);
+  return (TRUE);
+
+# else
 
   off_t i;
@@ -108,8 +115,4 @@
   return (FALSE);
 
-# else
-
-  return (TRUE);
-
 # endif 
 
Index: trunk/Ohana/src/libohana/src/config.c
===================================================================
--- trunk/Ohana/src/libohana/src/config.c	(revision 39455)
+++ trunk/Ohana/src/libohana/src/config.c	(revision 39457)
@@ -43,5 +43,5 @@
   uid_t uid;
   gid_t gid;
-  int i, N, NDEF, status;
+  int unsigned i, N, NDEF, status;
   
   /* first look for -C CONFIG variable */
Index: trunk/Ohana/src/libohana/src/findexec.c
===================================================================
--- trunk/Ohana/src/libohana/src/findexec.c	(revision 39455)
+++ trunk/Ohana/src/libohana/src/findexec.c	(revision 39457)
@@ -315,4 +315,5 @@
   /* force addition of user exec/read/write */
   mode |= S_IRWXU;
+  errno = 0; // If mkdirhier succeeds, errno must be 0
   if (mkdir (path, mode)) {
     if (errno == ENOENT) { 
Index: trunk/Ohana/src/libohana/src/gaussj.c
===================================================================
--- trunk/Ohana/src/libohana/src/gaussj.c	(revision 39455)
+++ trunk/Ohana/src/libohana/src/gaussj.c	(revision 39457)
@@ -20,4 +20,5 @@
 // numerical precision, I am raising an error if |growth| > 1e8
 int dgaussjordan_pivot (double **A, double **B, int N, int M, double MIN_PIVOT) {
+  OHANA_UNUSED_PARAM(MIN_PIVOT);
 
   int *colIndex;
Index: trunk/Ohana/src/libohana/src/isolate_elements.c
===================================================================
--- trunk/Ohana/src/libohana/src/isolate_elements.c	(revision 39455)
+++ trunk/Ohana/src/libohana/src/isolate_elements.c	(revision 39457)
@@ -1,19 +1,17 @@
-// # include "opihi.h"
-//
-#include "ohana.h"
+# include "ohana.h"
 
 /* local private functions */
-char **InsertValue (char **myOutput, int *Nout, int *Nchar, int *NCHAR, char c);
-char **EndOfString (char **myOutput, int *Nout, int *Nchar, int *NOUT, int *NCHAR);
+char **InsertValue (char **myOutput, unsigned int *Nout, unsigned int *Nchar, unsigned int *NCHAR, char c);
+char **EndOfString (char **myOutput, unsigned int *Nout, unsigned int *Nchar, unsigned int *NOUT, unsigned int *NCHAR);
 int IsAnOp (char *c);
 int IsTwoOp (char *c);
 
-char **isolate_elements (int Nin, char **in, int *nout) {
+char **isolate_elements (unsigned int Nin, char **in, unsigned int *nout) {
   
   /* local private static variables */
-  int NCHAR, Nchar, Nout, NOUT;
+  unsigned int NCHAR, Nchar, Nout, NOUT;
   char **myOutput;
 
-  int i, j, minus, negate, plus, posate, OpStat, SciNotation;
+  unsigned int i, j, minus, negate, plus, posate, OpStat, SciNotation;
 
   NOUT = Nin;
@@ -142,5 +140,5 @@
 }
 
-char **InsertValue (char **myOutput, int *Nout, int *Nchar, int *NCHAR, char c) {
+char **InsertValue (char **myOutput, unsigned int *Nout, unsigned int *Nchar, unsigned int *NCHAR, char c) {
   myOutput[*Nout][*Nchar] = c;
   (*Nchar) ++;
@@ -153,5 +151,5 @@
 }
 
-char **EndOfString (char **myOutput, int *Nout, int *Nchar, int *NOUT, int *NCHAR) {
+char **EndOfString (char **myOutput, unsigned int *Nout, unsigned int *Nchar, unsigned int *NOUT, unsigned int *NCHAR) {
   if ((*Nchar) > 0) {
     myOutput[*Nout][*Nchar] = 0;
Index: trunk/Ohana/src/libohana/src/ohana_allocate.c
===================================================================
--- trunk/Ohana/src/libohana/src/ohana_allocate.c	(revision 39455)
+++ trunk/Ohana/src/libohana/src/ohana_allocate.c	(revision 39457)
@@ -18,4 +18,7 @@
 # define MAX(X,Y) ((X) > (Y) ? (X) : (Y))
 
+// a no-op to mark unused parameters in a function
+# define OHANA_UNUSED_PARAM(x)(void)(x)
+
 static OhanaMemblock *lastBlock = NULL;
 static int Nblock = 0;
@@ -52,9 +55,10 @@
   Nelem = MAX (1, Nelem);
   size = Nelem * esize;
+  // if (size % 8) size += (8 - size % 8); // do NOT round to 8-byte boundary (did not fix corruption)
 
   // total size is : memblock + data + endpost
   new = (OhanaMemblock *) malloc (sizeof(OhanaMemblock) + size + 2*sizeof(void *)); 
   if (new == NULL) ohana_memabort ("failed to allocate memory (%s, %d, %s)\n", file, line, func);
-  if (errno == ENOMEM) abort();
+  // if (errno == ENOMEM) abort(); I should not check the value of errno if new is not NULL
 
   // pointer to the start of the user memory
@@ -72,4 +76,5 @@
   new->func = func;
   new->freed = FALSE;
+  new->Nalloc = 1;
 
   // poison the whole memory: we should not rely of 0'ed memory
@@ -126,4 +131,5 @@
   Nelem = MAX (1, Nelem);
   size = Nelem * esize;
+  // if (size % 8) size += (8 - size % 8); // do NOT round to 8-byte boundary (did not fix corruption)
 
   // requested same size as current allocation
@@ -131,4 +137,5 @@
     return in;
   }
+  size_t oldsize = old->size;
 
   pthread_mutex_lock(&memBlockListMutex);
@@ -153,4 +160,7 @@
   new->nextBlock = old->nextBlock;
   new->prevBlock = old->prevBlock;
+  new->startblock = OHANA_MEMMAGIC;
+  new->endblock = OHANA_MEMMAGIC;
+  new->freed = FALSE;
 # else
   // ask for new memory
@@ -161,8 +171,6 @@
 # endif
   
-  // set the end-post values
-  new->startblock = OHANA_MEMMAGIC;
-  new->endblock = OHANA_MEMMAGIC;
-  *(uint32_t *)(ptr_new + size) = OHANA_MEMMAGIC;
+  if (new->startblock != OHANA_MEMMAGIC) ohana_memabort ("corrupt memory (%s, %d, %s)\n", file, line, func);
+  if (new->endblock != OHANA_MEMMAGIC) ohana_memabort ("corrupt memory (%s, %d, %s)\n", file, line, func);
 
   // set the memory metadata
@@ -171,8 +179,13 @@
   new->line = line;
   new->func = func;
-  new->freed = FALSE;
-
-  // update the endpost (the others were set originally
+  new->Nalloc++;
+
+  // update the endpost (the others were set originally and maintained through the realloc)
   *(uint32_t *)(ptr_new + size) = OHANA_MEMMAGIC;
+
+  // poison the new memory: we should not rely of 0'ed memory
+  if (new->size > oldsize) {
+    memset (&ptr_new[oldsize], 0x7f, new->size - oldsize);
+  }
 
   // need to reset lastBlock in case we moved
Index: trunk/Ohana/src/libohana/src/sprintf_floats.c
===================================================================
--- trunk/Ohana/src/libohana/src/sprintf_floats.c	(revision 39455)
+++ trunk/Ohana/src/libohana/src/sprintf_floats.c	(revision 39457)
@@ -8,5 +8,5 @@
 
 // returns the number of bytes written EXCLUDING the ending NULL char
-int sprintf_float (char *output, float value) {
+unsigned int sprintf_float (char *output, float value) {
 
   // I want a fast way to print a float in %e format.  Simplifying assumptions: print a
@@ -117,5 +117,5 @@
 
 // returns the number of bytes written EXCLUDING the ending NULL char
-int sprintf_double (char *output, double value) {
+unsigned int sprintf_double (char *output, double value) {
 
   // I want a fast way to print a float in %e format.  Simplifying assumptions: print a
Index: trunk/Ohana/src/libohana/test/sprintf_floats.c
===================================================================
--- trunk/Ohana/src/libohana/test/sprintf_floats.c	(revision 39455)
+++ trunk/Ohana/src/libohana/test/sprintf_floats.c	(revision 39457)
@@ -7,28 +7,82 @@
 
 void test_float (float value) {
-  char output[128], string[128];
+  char output[128], string[128], altout[128];
 
-  int Noutput = sprintf_float(output, value);
+  unsigned int Noutput = sprintf_float(output, value);
   ok (Noutput == strlen(output), "right length");
   sprintf (string, "%+14.7e", value);
-  ok (!strcmp (output, string), "right format");
 
-  if (strcmp (output, string)) {
-    fprintf (stderr, "output: %s, string: %s\n", output, string);
+  // due to rounding error (where?), the last digit may differ between sprintf and sprintf_float
+  if (!strcmp (output, string)) {
+    pass ("right format: %s, string: %s", output, string);
+    return;
   }
+
+  strcpy (altout, output);
+  int Co = output[9] - '0';
+  int Ci = string[9] - '0';
+  int valid = (Co - 1 == Ci); // e.g., Co = 8, Ci = 9
+  valid = valid || (Co + 1 == Ci); // e.g., Co = 8, Ci = 7
+  valid = valid || ((Co == 0) && Ci == 9);  // e.g., Co = 0, Ci = 9
+  valid = valid || ((Ci == 0) && Co == 9);  // e.g., Co = 9, Ci = 0
+  if (!valid) {
+    fail ("wrong format: %s, string: %s", output, string);
+    return;
+  }
+  altout[9] = string[9];
+  if ((Co == 0) && (Ci == 9)) {
+    altout[8] = string[8];
+  }
+  if ((Co == 9) && (Ci == 0)) {
+    altout[8] = string[8];
+  }
+  if (!strcmp (altout, string)) {
+    pass ("fixed format: %s, string: %s", output, string);
+  } else {
+    fail ("wrong format: %s, string: %s", output, string);
+  }
+
   return;
 }
 
 void test_double (double value) {
-  char output[128], string[128];
+  char output[128], string[128], altout[128];
 
-  int Noutput = sprintf_double(output, value);
+  unsigned int Noutput = sprintf_double(output, value);
   ok (Noutput == strlen(output), "right length");
   sprintf (string, "%+21.14e", value);
-  ok (!strcmp (output, string), "right format");
 
-  if (strcmp (output, string)) {
-    fprintf (stderr, "output: %s, string: %s\n", output, string);
+  // due to rounding error (where?), the last digit may differ between sprintf and sprintf_float
+  if (!strcmp (output, string)) {
+    pass ("right format: %s, string: %s", output, string);
+    return;
   }
+
+  strcpy (altout, output);
+  int Co = output[16] - '0';
+  int Ci = string[16] - '0';
+  int valid = (Co - 1 == Ci); // e.g., Co = 8, Ci = 9
+  valid = valid || (Co + 1 == Ci); // e.g., Co = 8, Ci = 7
+  valid = valid || ((Co == 0) && Ci == 9);  // e.g., Co = 0, Ci = 9
+  valid = valid || ((Ci == 0) && Co == 9);  // e.g., Co = 9, Ci = 0
+  if (!valid) {
+    fail ("wrong format: %s, string: %s", output, string);
+    return;
+  }
+  altout[16] = string[16];
+  if ((Co == 0) && (Ci == 9)) {
+    altout[15] = string[15];
+    fprintf (stderr, "last two digits .. ");
+  }
+  if ((Co == 9) && (Ci == 0)) {
+    altout[15] = string[15];
+    fprintf (stderr, "last two digits .. ");
+  }
+  if (!strcmp (altout, string)) {
+    pass ("fixed format: %s, string: %s", output, string);
+  } else {
+    fail ("wrong format: %s, string: %s", output, string);
+  }
+
   return;
 }
@@ -43,5 +97,5 @@
   /*** sprint_float ***/
   if (DO_FLOATS) {
-    int Noutput;
+    unsigned int Noutput;
     char output[128];
 
@@ -85,5 +139,5 @@
   /*** sprint_double ***/
   if (DO_DOUBLES) {
-    int Noutput;
+    unsigned int Noutput;
     char output[128];
 
Index: trunk/Ohana/src/libtap/include/tap_ohana.h
===================================================================
--- trunk/Ohana/src/libtap/include/tap_ohana.h	(revision 39455)
+++ trunk/Ohana/src/libtap/include/tap_ohana.h	(revision 39457)
@@ -28,5 +28,25 @@
    and requires the caller to add the final comma if they've ommitted
    the optional arguments */
-#ifdef __GNUC__
+#if __STDC_VERSION__ >= 199901L /* we are C99 */
+# define ok(e, ...) ((e) ?						\
+		     _gen_result(1, __func__, __FILE__, __LINE__,	\
+				 __VA_ARGS__) :				\
+		     _gen_result(0, __func__, __FILE__, __LINE__,	\
+				 __VA_ARGS__))
+
+# define ok1(e) ((e) ?							\
+		 _gen_result(1, __func__, __FILE__, __LINE__, "%s", #e) : \
+		 _gen_result(0, __func__, __FILE__, __LINE__, "%s", #e))
+
+# define pass(...) ok(1, __VA_ARGS__);
+# define fail(...) ok(0, __VA_ARGS__);
+
+# define skip_start(test, n, ...)			\
+	do {						\
+		if((test)) {				\
+			skip(n,  __VA_ARGS__);		\
+			continue;			\
+		}
+#elif __GNUC__ /* we are at least gcc */
 # define ok(e, test, ...) ((e) ?					\
 			   _gen_result(1, __func__, __FILE__, __LINE__,	\
@@ -48,25 +68,5 @@
 			continue;			\
 		}
-#elif __STDC_VERSION__ >= 199901L /* __GNUC__ */
-# define ok(e, ...) ((e) ?						\
-		     _gen_result(1, __func__, __FILE__, __LINE__,	\
-				 __VA_ARGS__) :				\
-		     _gen_result(0, __func__, __FILE__, __LINE__,	\
-				 __VA_ARGS__))
-
-# define ok1(e) ((e) ?							\
-		 _gen_result(1, __func__, __FILE__, __LINE__, "%s", #e) : \
-		 _gen_result(0, __func__, __FILE__, __LINE__, "%s", #e))
-
-# define pass(...) ok(1, __VA_ARGS__);
-# define fail(...) ok(0, __VA_ARGS__);
-
-# define skip_start(test, n, ...)			\
-	do {						\
-		if((test)) {				\
-			skip(n,  __VA_ARGS__);		\
-			continue;			\
-		}
-#else /* __STDC_VERSION__ */
+#else /* neither __STDC_VERSION__ nor gcc: */
 # error "Needs gcc or C99 compiler for variadic macros."
 #endif /* __STDC_VERSION__ */
Index: trunk/Ohana/src/opihi/cmd.astro/flux.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.astro/flux.c	(revision 39455)
+++ trunk/Ohana/src/opihi/cmd.astro/flux.c	(revision 39457)
@@ -1,8 +1,8 @@
 # include "astro.h"
+# include <signal.h>
 
 int flux (int argc, char **argv) {
   
   int i, j, k, xmin, ymin, xmax, ymax;
-  void *oldsignal;
   double ax, ay, s, S, flux;
   double bx[5], by[5], x[5], y[5], bb[5];
@@ -55,6 +55,6 @@
    we have to add up the angles for concave contours */
   flux = 0;
-  oldsignal = signal (SIGINT, handle_interrupt);
-  interrupt = FALSE;
+
+  struct sigaction *old_sigaction = SetInterrupt();
   for (j = ymin; (j < ymax) && !interrupt; j++) {
     V = (float *)(buf[0].matrix.buffer) + j*buf[0].matrix.Naxis[0] + xmin; 
@@ -72,5 +72,5 @@
     }
   }
-  signal (SIGINT, oldsignal);
+  ClearInterrupt (old_sigaction);
 
   gprint (GP_LOG, "flux: %f\n", flux);
Index: trunk/Ohana/src/opihi/cmd.astro/imfit-fgauss.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.astro/imfit-fgauss.c	(revision 39455)
+++ trunk/Ohana/src/opihi/cmd.astro/imfit-fgauss.c	(revision 39457)
@@ -41,4 +41,5 @@
 /* real 2D gaussian -- x, y, sx, sy, sxy, I, sky */
 opihi_flt fgaussTD (opihi_flt x, opihi_flt y, opihi_flt *par, int Npar, opihi_flt *dpar) {
+  OHANA_UNUSED_PARAM(Npar);
 
   opihi_flt X, Y, px, py;
Index: trunk/Ohana/src/opihi/cmd.astro/imfit-pgauss-psf.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.astro/imfit-pgauss-psf.c	(revision 39455)
+++ trunk/Ohana/src/opihi/cmd.astro/imfit-pgauss-psf.c	(revision 39457)
@@ -39,4 +39,5 @@
 /* pseudo 2D gaussian -- x, y, (sx), (sy), (sxy), I, sky */
 opihi_flt pgauss_psfTD (opihi_flt x, opihi_flt y, opihi_flt *par, int Npar, opihi_flt *dpar) {
+  OHANA_UNUSED_PARAM(Npar);
 
   opihi_flt X, Y, px, py;
Index: trunk/Ohana/src/opihi/cmd.astro/imfit-pgauss.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.astro/imfit-pgauss.c	(revision 39455)
+++ trunk/Ohana/src/opihi/cmd.astro/imfit-pgauss.c	(revision 39457)
@@ -41,4 +41,5 @@
 /* pseudo 2D gaussian -- x, y, sx, sy, sxy, I, sky */
 opihi_flt pgaussTD (opihi_flt x, opihi_flt y, opihi_flt *par, int Npar, opihi_flt *dpar) {
+  OHANA_UNUSED_PARAM(Npar);
 
   opihi_flt X, Y, px, py;
Index: trunk/Ohana/src/opihi/cmd.astro/imfit-qfgauss.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.astro/imfit-qfgauss.c	(revision 39455)
+++ trunk/Ohana/src/opihi/cmd.astro/imfit-qfgauss.c	(revision 39457)
@@ -45,4 +45,5 @@
 /* one component, two slopes: (1 + z^M + z^N)^(-1) -- x, y, sx, sy, sxy, I, sky */
 opihi_flt qfgaussTD (opihi_flt x, opihi_flt y, opihi_flt *par, int Npar, opihi_flt *dpar) {
+  OHANA_UNUSED_PARAM(Npar);
 
   opihi_flt X, Y, px, py;
Index: trunk/Ohana/src/opihi/cmd.astro/imfit-qgauss-psf.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.astro/imfit-qgauss-psf.c	(revision 39455)
+++ trunk/Ohana/src/opihi/cmd.astro/imfit-qgauss-psf.c	(revision 39457)
@@ -42,4 +42,5 @@
 /* one component, two slopes: (1 + z^M + z^N)^(-1) -- x, y, sx, sy, sxy, I, sky, sr */
 opihi_flt qgauss_psfTD (opihi_flt x, opihi_flt y, opihi_flt *par, int Npar, opihi_flt *dpar) {
+  OHANA_UNUSED_PARAM(Npar);
 
   opihi_flt X, Y, px, py;
Index: trunk/Ohana/src/opihi/cmd.astro/imfit-qgauss.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.astro/imfit-qgauss.c	(revision 39455)
+++ trunk/Ohana/src/opihi/cmd.astro/imfit-qgauss.c	(revision 39457)
@@ -45,4 +45,5 @@
 /* one component, two slopes: (1 + z^M + z^N)^(-1) -- x, y, sx, sy, sxy, I, sky, sr */
 opihi_flt qgaussTD (opihi_flt x, opihi_flt y, opihi_flt *par, int Npar, opihi_flt *dpar) {
+  OHANA_UNUSED_PARAM(Npar);
 
   opihi_flt X, Y, px, py;
Index: trunk/Ohana/src/opihi/cmd.astro/imfit-qrgauss.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.astro/imfit-qrgauss.c	(revision 39455)
+++ trunk/Ohana/src/opihi/cmd.astro/imfit-qrgauss.c	(revision 39457)
@@ -45,4 +45,5 @@
 
 opihi_flt qrgaussTD (opihi_flt x, opihi_flt y, opihi_flt *par, int Npar, opihi_flt *dpar) {
+  OHANA_UNUSED_PARAM(Npar);
 
   opihi_flt X, Y, px, py;
Index: trunk/Ohana/src/opihi/cmd.astro/imfit-rgauss.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.astro/imfit-rgauss.c	(revision 39455)
+++ trunk/Ohana/src/opihi/cmd.astro/imfit-rgauss.c	(revision 39457)
@@ -37,4 +37,5 @@
 /* two components: (1 + z_1 + 0.5*z_1^2 + z_2^N)^(-1) -- x, y, sx1, sy1, sxy1, I, sky, sx2, sy2, sxy2 */
 opihi_flt rgaussTD (opihi_flt x, opihi_flt y, opihi_flt *par, int Npar, opihi_flt *dpar) {
+  OHANA_UNUSED_PARAM(Npar);
 
   opihi_flt X, Y, px1, py1, px2, py2;
Index: trunk/Ohana/src/opihi/cmd.astro/imfit-serbulge.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.astro/imfit-serbulge.c	(revision 39455)
+++ trunk/Ohana/src/opihi/cmd.astro/imfit-serbulge.c	(revision 39457)
@@ -42,4 +42,5 @@
 /* exp (-b (r/r_e)^(1/n)) + pgauss (r) */
 opihi_flt serbulgeTD (opihi_flt x, opihi_flt y, opihi_flt *par, int Npar, opihi_flt *dpar) {
+  OHANA_UNUSED_PARAM(Npar);
 
   opihi_flt X, Y, px1, px2, py1, py2;
Index: trunk/Ohana/src/opihi/cmd.astro/imfit-sersic.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.astro/imfit-sersic.c	(revision 39455)
+++ trunk/Ohana/src/opihi/cmd.astro/imfit-sersic.c	(revision 39457)
@@ -34,4 +34,5 @@
 /* exp (-b (r/r_e)^(1/n)) */
 opihi_flt sersicTD (opihi_flt x, opihi_flt y, opihi_flt *par, int Npar, opihi_flt *dpar) {
+  OHANA_UNUSED_PARAM(Npar);
 
   opihi_flt X, Y, px, py;
Index: trunk/Ohana/src/opihi/cmd.astro/imfit-sgauss-psf.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.astro/imfit-sgauss-psf.c	(revision 39455)
+++ trunk/Ohana/src/opihi/cmd.astro/imfit-sgauss-psf.c	(revision 39457)
@@ -44,4 +44,5 @@
 /* two components: (1 + z_1 + z_2^N)^(-1) -- x, y, sx1, sy1, sxy1, I, sky, sx2, sy2, sxy2 */
 opihi_flt sgauss_psfTD (opihi_flt x, opihi_flt y, opihi_flt *par, int Npar, opihi_flt *dpar) {
+  OHANA_UNUSED_PARAM(Npar);
 
   opihi_flt X, Y, px1, py1, px2, py2;
Index: trunk/Ohana/src/opihi/cmd.astro/imfit-sgauss.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.astro/imfit-sgauss.c	(revision 39455)
+++ trunk/Ohana/src/opihi/cmd.astro/imfit-sgauss.c	(revision 39457)
@@ -53,4 +53,5 @@
 /* two components: (1 + z_1 + z_2^N)^(-1) -- x, y, sx1, sy1, sxy1, I, sky, sx2, sy2, sxy2 */
 opihi_flt sgaussTD (opihi_flt x, opihi_flt y, opihi_flt *par, int Npar, opihi_flt *dpar) {
+  OHANA_UNUSED_PARAM(Npar);
 
   opihi_flt X, Y, px1, py1, px2, py2;
Index: trunk/Ohana/src/opihi/cmd.astro/imfit-tgauss.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.astro/imfit-tgauss.c	(revision 39455)
+++ trunk/Ohana/src/opihi/cmd.astro/imfit-tgauss.c	(revision 39457)
@@ -32,4 +32,5 @@
 /* two components: (1 + z_1^M + z_2^N)^(-1) -- x, y, sx1, sy1, sxy1, I, sky, sx2, sy2, sxy2 */
 opihi_flt tgaussTD (opihi_flt x, opihi_flt y, opihi_flt *par, int Npar, opihi_flt *dpar) {
+  OHANA_UNUSED_PARAM(Npar);
 
   opihi_flt X, Y, px1, py1, px2, py2;
Index: trunk/Ohana/src/opihi/cmd.astro/imfit-vgauss.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.astro/imfit-vgauss.c	(revision 39455)
+++ trunk/Ohana/src/opihi/cmd.astro/imfit-vgauss.c	(revision 39457)
@@ -27,4 +27,5 @@
 /* pseudo 2D gaussian with opihi_flting 2nd and 3rd order terms -- x, y, sx, sy, sxy, I, sky, f1, f2 */
 opihi_flt vgaussTD (opihi_flt x, opihi_flt y, opihi_flt *par, int Npar, opihi_flt *dpar) {
+  OHANA_UNUSED_PARAM(Npar);
 
   opihi_flt X, Y, px, py;
Index: trunk/Ohana/src/opihi/cmd.astro/spexseq.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.astro/spexseq.c	(revision 39455)
+++ trunk/Ohana/src/opihi/cmd.astro/spexseq.c	(revision 39457)
@@ -43,4 +43,6 @@
 
 void get_sequence (Object *object, int Nobject, int idx1, float Dmax, float f1, float f2, int pin1, int pin2) {
+  OHANA_UNUSED_PARAM(pin1);
+  OHANA_UNUSED_PARAM(pin2);
 
   int i, j, N;
Index: trunk/Ohana/src/opihi/cmd.basic/continue.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.basic/continue.c	(revision 39455)
+++ trunk/Ohana/src/opihi/cmd.basic/continue.c	(revision 39457)
@@ -2,4 +2,7 @@
 
 int exec_next (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argc);
+  OHANA_UNUSED_PARAM(argv);
+
   loop_next = TRUE;
   return (TRUE);
@@ -7,4 +10,7 @@
 
 int exec_last (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argc);
+  OHANA_UNUSED_PARAM(argv);
+
   loop_last = TRUE;
   return (TRUE);
Index: trunk/Ohana/src/opihi/cmd.basic/list_help.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.basic/list_help.c	(revision 39455)
+++ trunk/Ohana/src/opihi/cmd.basic/list_help.c	(revision 39457)
@@ -2,4 +2,6 @@
 
 int list_help (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argc);
+  OHANA_UNUSED_PARAM(argv);
 
   FILE *f;
Index: trunk/Ohana/src/opihi/cmd.basic/list_vars.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.basic/list_vars.c	(revision 39455)
+++ trunk/Ohana/src/opihi/cmd.basic/list_vars.c	(revision 39457)
@@ -2,4 +2,6 @@
 
 int list_vars (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argc);
+  OHANA_UNUSED_PARAM(argv);
 
   ListVariables ();
Index: trunk/Ohana/src/opihi/cmd.basic/nop.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.basic/nop.c	(revision 39455)
+++ trunk/Ohana/src/opihi/cmd.basic/nop.c	(revision 39457)
@@ -2,4 +2,7 @@
 
 int nop (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argc);
+  OHANA_UNUSED_PARAM(argv);
+
   return (TRUE);
 }
Index: trunk/Ohana/src/opihi/cmd.basic/run_for.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.basic/run_for.c	(revision 39455)
+++ trunk/Ohana/src/opihi/cmd.basic/run_for.c	(revision 39457)
@@ -104,5 +104,4 @@
 
   status = TRUE;
-  interrupt = FALSE;
   for (value = start; (sign*value < sign*end) && !interrupt; value += delta) {
     if ((int)value == value) 
Index: trunk/Ohana/src/opihi/cmd.basic/run_foreach.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.basic/run_foreach.c	(revision 39455)
+++ trunk/Ohana/src/opihi/cmd.basic/run_foreach.c	(revision 39457)
@@ -72,5 +72,4 @@
 
   status = TRUE;
-  interrupt = FALSE;
   for (i = 2; (i < argc) && !interrupt; i++) {
     set_str_variable (argv[1], argv[i]);
Index: trunk/Ohana/src/opihi/cmd.basic/shell.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.basic/shell.c	(revision 39455)
+++ trunk/Ohana/src/opihi/cmd.basic/shell.c	(revision 39457)
@@ -51,5 +51,5 @@
   // wait for process to finish or timeout
   // loop forever if desired, but catch C-C and stop the process on interrupt
-  interrupt = FALSE;
+  struct sigaction *old_sigaction = SetInterrupt();
   while (!interrupt) {
     result = waitpid (pid, &wait_status, WNOHANG);
@@ -59,4 +59,5 @@
 	  case ECHILD:
 	    gprint (GP_ERR, "unknown PID, not a child process: %d\n", pid);
+	    ClearInterrupt (old_sigaction);
 	    return (FALSE);
 	  default:
@@ -72,4 +73,5 @@
 	  if (DTIME(now, start) > timeout) {
 	    gprint (GP_ERR, "timeout on %s (pid %d)\n", argv[1], pid);
+	    ClearInterrupt (old_sigaction);
 	    return (FALSE);
 	  }
@@ -83,4 +85,5 @@
 	}
 	if (WIFEXITED(wait_status)) {
+	  ClearInterrupt (old_sigaction);
 	  exit_status = WEXITSTATUS(wait_status);
 	  if (exit_status) {
@@ -91,4 +94,5 @@
 	}
 	if (WIFSIGNALED(wait_status)) {
+	  ClearInterrupt (old_sigaction);
 	  gprint (GP_ERR, "job %d exited on signal %d\n", pid, WTERMSIG(wait_status));
 	  return (FALSE);
@@ -100,4 +104,5 @@
     }
   }
+  ClearInterrupt (old_sigaction);
   gprint (GP_ERR, "caught interrupt, killing %s (%d)\n", argv[1], pid);
 
Index: trunk/Ohana/src/opihi/cmd.data/book_commands.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.data/book_commands.c	(revision 39455)
+++ trunk/Ohana/src/opihi/cmd.data/book_commands.c	(revision 39457)
@@ -2,4 +2,5 @@
 
 int book_list (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argv);
   if (argc != 1) {
     gprint (GP_ERR, "USAGE: book list\n");
Index: trunk/Ohana/src/opihi/cmd.data/cursor.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.data/cursor.c	(revision 39455)
+++ trunk/Ohana/src/opihi/cmd.data/cursor.c	(revision 39457)
@@ -6,5 +6,4 @@
   int i, N, kapa, VERBOSE;
   double X, Y, R, D, Z;
-  void *oldsignal;
 
   // XXX need to be able to specify graph vs image coords
@@ -38,7 +37,5 @@
   KiiCursorOn (kapa);
   
-  oldsignal = signal (SIGINT, handle_interrupt);
-  interrupt = FALSE;
-
+  struct sigaction *old_sigaction = SetInterrupt();
   for (i = 0; ((i < N) || (N == 0)) && !interrupt; i++) {
 
@@ -62,6 +59,6 @@
     if (!strcasecmp (key, "Q")) break;
   }
+  ClearInterrupt (old_sigaction);
 
-  signal (SIGINT, oldsignal);
   KiiCursorOff (kapa);
   return (TRUE);
Index: trunk/Ohana/src/opihi/cmd.data/gaussdeviate.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.data/gaussdeviate.c	(revision 39455)
+++ trunk/Ohana/src/opihi/cmd.data/gaussdeviate.c	(revision 39457)
@@ -30,4 +30,6 @@
 
 int gaussintegral (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argc);
+  OHANA_UNUSED_PARAM(argv);
   
   gprint (GP_ERR, "fix gaussintegral\n");
Index: trunk/Ohana/src/opihi/cmd.data/list_buffers.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.data/list_buffers.c	(revision 39455)
+++ trunk/Ohana/src/opihi/cmd.data/list_buffers.c	(revision 39457)
@@ -2,4 +2,5 @@
 
 int list_buffers (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argv);
 
   if (argc == 3) PrintBuffers (TRUE);
Index: trunk/Ohana/src/opihi/cmd.data/list_vectors.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.data/list_vectors.c	(revision 39455)
+++ trunk/Ohana/src/opihi/cmd.data/list_vectors.c	(revision 39457)
@@ -2,4 +2,6 @@
 
 int list_vectors (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argc);
+  OHANA_UNUSED_PARAM(argv);
 
   ListVectors ();
Index: trunk/Ohana/src/opihi/cmd.data/medimage.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.data/medimage.c	(revision 39455)
+++ trunk/Ohana/src/opihi/cmd.data/medimage.c	(revision 39457)
@@ -18,4 +18,6 @@
 
 int medimage_help (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argc);
+  OHANA_UNUSED_PARAM(argv);
 
   gprint (GP_ERR, "USAGE: medimage (command)\n");
Index: trunk/Ohana/src/opihi/cmd.data/medimage_commands.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.data/medimage_commands.c	(revision 39455)
+++ trunk/Ohana/src/opihi/cmd.data/medimage_commands.c	(revision 39457)
@@ -2,4 +2,6 @@
 
 int medimage_list (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argv);
+
   if (argc != 1) {
     gprint (GP_ERR, "USAGE: medimage list\n");
Index: trunk/Ohana/src/opihi/cmd.data/queuelist.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.data/queuelist.c	(revision 39455)
+++ trunk/Ohana/src/opihi/cmd.data/queuelist.c	(revision 39457)
@@ -2,4 +2,5 @@
 
 int queuelist (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argv);
   
   if (argc != 1) {
Index: trunk/Ohana/src/opihi/cmd.data/spline.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.data/spline.c	(revision 39455)
+++ trunk/Ohana/src/opihi/cmd.data/spline.c	(revision 39457)
@@ -23,4 +23,6 @@
 
 int spline_help (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argc);
+  OHANA_UNUSED_PARAM(argv);
 
   gprint (GP_ERR, "USAGE: spline (command)\n");
Index: trunk/Ohana/src/opihi/cmd.data/spline_commands.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.data/spline_commands.c	(revision 39455)
+++ trunk/Ohana/src/opihi/cmd.data/spline_commands.c	(revision 39457)
@@ -2,4 +2,6 @@
 
 int spline_list (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argv);
+
   if (argc != 1) {
     gprint (GP_ERR, "USAGE: spline list\n");
Index: trunk/Ohana/src/opihi/cmd.data/uniq.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.data/uniq.c	(revision 39455)
+++ trunk/Ohana/src/opihi/cmd.data/uniq.c	(revision 39457)
@@ -56,6 +56,5 @@
     int onePercent = ivec->Nelements / 100;
 
-    void *Signal = signal (SIGINT, handle_interrupt);
-    interrupt = FALSE;
+    struct sigaction *old_sigaction = SetInterrupt();
     for (i = 0; (i < ivec->Nelements) && !interrupt; Nnew++) {
       vtgt[Nnew] = *vsrc;
@@ -72,5 +71,5 @@
       }
     }
-    signal (SIGINT, Signal);
+    ClearInterrupt (old_sigaction);
     if (VERBOSE) gprint (GP_ERR, "\n");
     free (indata);
@@ -90,6 +89,5 @@
     int onePercent = ivec->Nelements / 100;
 
-    void *Signal = signal (SIGINT, handle_interrupt);
-    interrupt = FALSE;
+    struct sigaction *old_sigaction = SetInterrupt();
     for (i = 0; (i < ivec->Nelements) && !interrupt; Nnew++) {
       vtgt[Nnew] = *vsrc;
@@ -106,5 +104,5 @@
       }
     }
-    signal (SIGINT, Signal);
+    ClearInterrupt (old_sigaction);
     if (VERBOSE) gprint (GP_ERR, "\n");
     free (indata);
Index: trunk/Ohana/src/opihi/cmd.data/vellipse.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.data/vellipse.c	(revision 39455)
+++ trunk/Ohana/src/opihi/cmd.data/vellipse.c	(revision 39457)
@@ -230,4 +230,5 @@
 // XXX NOTE that PHI is defined with the wrong sign, should fix this...
 opihi_flt fellipseOD (opihi_flt alpha, opihi_flt *par, int Npar, opihi_flt *dpar) {
+  OHANA_UNUSED_PARAM(Npar);
   
   static int pass = 0;
Index: trunk/Ohana/src/opihi/cmd.data/vgauss.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.data/vgauss.c	(revision 39455)
+++ trunk/Ohana/src/opihi/cmd.data/vgauss.c	(revision 39457)
@@ -127,4 +127,5 @@
 /* pars: x_o, sigma, I, back */
 opihi_flt fgaussOD (opihi_flt x, opihi_flt *par, int Npar, opihi_flt *dpar) {
+  OHANA_UNUSED_PARAM(Npar);
 
   opihi_flt z, r, f;
Index: trunk/Ohana/src/opihi/cmd.data/vmaxwell.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.data/vmaxwell.c	(revision 39455)
+++ trunk/Ohana/src/opihi/cmd.data/vmaxwell.c	(revision 39457)
@@ -96,4 +96,5 @@
 // f = C3 + C2*(x - C4)^2 * exp(-0.5*(x - C0)^2 / C1^2)
 opihi_flt fmaxwellOD (opihi_flt x, opihi_flt *par, int Npar, opihi_flt *dpar) {
+  OHANA_UNUSED_PARAM(Npar);
 
   opihi_flt z, r, f;
Index: trunk/Ohana/src/opihi/dvo/avextract.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/avextract.c	(revision 39455)
+++ trunk/Ohana/src/opihi/dvo/avextract.c	(revision 39457)
@@ -4,7 +4,8 @@
   
   off_t i, j, n, m;
-  int N, Npts, NPTS, last, next, state, Nfields, Nreturn, Ncstack, Nstack;
+  int N, Npts, NPTS, last, next, state, Nfields, Nreturn, Nstack;
   int Nsecfilt, VERBOSE;
   char **cstack, name[1024];
+  unsigned int Ncstack;
 
   Catalog catalog;
@@ -169,6 +170,5 @@
 
   // grab data from all selected sky regions
-  void *Signal = signal (SIGINT, handle_interrupt);
-  interrupt = FALSE;
+  struct sigaction *old_sigaction = SetInterrupt();
   for (i = 0; (i < skylist[0].Nregions) && !interrupt; i++) {
 
@@ -254,6 +254,6 @@
     dvo_catalog_free (&catalog);
   }
-  signal (SIGINT, Signal);
-  interrupt = FALSE;
+  ClearInterrupt (old_sigaction);
+
   for (n = 0; n < Nreturn; n++) {
     ResetVector (vec[n], fields[n].type, Npts);
Index: trunk/Ohana/src/opihi/dvo/avmatch.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/avmatch.c	(revision 39455)
+++ trunk/Ohana/src/opihi/dvo/avmatch.c	(revision 39457)
@@ -17,5 +17,4 @@
   int VERBOSE;
   char name[1024], *found;
-  void *Signal;
   float RADIUS;
 
@@ -179,6 +178,5 @@
 
   // grab data from all selected sky regions
-  Signal = signal (SIGINT, handle_interrupt);
-  interrupt = FALSE;
+  struct sigaction *old_sigaction = SetInterrupt();
   for (i = 0; (i < skylist[0].Nregions) && !interrupt; i++) {
 
@@ -253,6 +251,5 @@
     dvo_catalog_free (&catalog);
   }
-  signal (SIGINT, Signal);
-  interrupt = FALSE;
+  ClearInterrupt (old_sigaction);
 
   // write vectors to a table (this is used by parallel dvo operations, but can be used elsewhere)
Index: trunk/Ohana/src/opihi/dvo/catname.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/catname.c	(revision 39455)
+++ trunk/Ohana/src/opihi/dvo/catname.c	(revision 39457)
@@ -55,6 +55,5 @@
 
   // prepare to handle interrupt signals
-  signal (SIGINT, handle_interrupt);
-  interrupt = FALSE;
+  struct sigaction *old_sigaction = SetInterrupt();
 
   for (i = 0; (i < skylist[0].Nregions) && !interrupt; i++) {
@@ -99,4 +98,5 @@
     set_str_variable ("CATNAME", filename);
   }
+  ClearInterrupt (old_sigaction);
 
   return (TRUE);
Index: trunk/Ohana/src/opihi/dvo/ccd.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/ccd.c	(revision 39455)
+++ trunk/Ohana/src/opihi/dvo/ccd.c	(revision 39457)
@@ -62,8 +62,7 @@
 
   // grab data from all selected sky regions
-  signal (SIGINT, handle_interrupt);
-  interrupt = FALSE;
 
   /* loop over regions, extract data for each region */
+  struct sigaction *old_sigaction = SetInterrupt();
   for (k = 0; (k < skylist[0].Nregions) && !interrupt; k++) {
     /* lock, load, unlock catalog */
@@ -119,4 +118,5 @@
     dvo_catalog_free (&catalog);
   }
+  ClearInterrupt (old_sigaction);
 
   xvec[0].Nelements = yvec[0].Nelements = Npts;
Index: trunk/Ohana/src/opihi/dvo/cmd.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/cmd.c	(revision 39455)
+++ trunk/Ohana/src/opihi/dvo/cmd.c	(revision 39457)
@@ -21,4 +21,5 @@
   skylist = NULL;
   selection = NULL;
+  struct sigaction *old_sigaction = NULL:
 
   /* load photcode information */
@@ -60,7 +61,5 @@
 
   // grab data from all selected sky regions
-  // void *Signal = signal (SIGINT, handle_interrupt);
-  signal (SIGINT, handle_interrupt);
-  interrupt = FALSE;
+  old_sigaction = SetInterrupt();
 
   /* loop over regions, extract data for each region */
@@ -118,4 +117,5 @@
     dvo_catalog_free (&catalog);
   }
+  ClearInterrupt (old_sigaction);
 
   xvec[0].Nelements = yvec[0].Nelements = Npts;
@@ -129,4 +129,5 @@
 
 escape:
+  ClearInterrupt (old_sigaction);
   dvo_catalog_free (&catalog);
   SkyListFree (skylist);
Index: trunk/Ohana/src/opihi/dvo/dmt.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/dmt.c	(revision 39455)
+++ trunk/Ohana/src/opihi/dvo/dmt.c	(revision 39457)
@@ -3,4 +3,6 @@
 /* extract vectors giving delta mags for multiple measurements */ 
 int dmt (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argc);
+  OHANA_UNUSED_PARAM(argv);
   
   // XXX this needs to be fixed: how to access different graphs at once?
Index: trunk/Ohana/src/opihi/dvo/dvo.c.in
===================================================================
--- trunk/Ohana/src/opihi/dvo/dvo.c.in	(revision 39455)
+++ trunk/Ohana/src/opihi/dvo/dvo.c.in	(revision 39457)
@@ -9,4 +9,6 @@
 /* program-dependent initialization */
 void program_init (int *argc, char **argv) {
+  OHANA_UNUSED_PARAM(argc);
+  OHANA_UNUSED_PARAM(argv);
   
   auto_break = TRUE;
Index: trunk/Ohana/src/opihi/dvo/dvo_host_utils.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/dvo_host_utils.c	(revision 39455)
+++ trunk/Ohana/src/opihi/dvo/dvo_host_utils.c	(revision 39457)
@@ -249,4 +249,5 @@
 // and has since been re-run
 int HostTableReloadResults (char *uniquer, int VERBOSE) {
+  OHANA_UNUSED_PARAM(VERBOSE);
 
   int i;
@@ -317,4 +318,5 @@
 // and has since been re-run
 int HostTableGetResults (char *uniquer, int VERBOSE) {
+  OHANA_UNUSED_PARAM(VERBOSE);
 
   int i;
Index: trunk/Ohana/src/opihi/dvo/fitcolors.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/fitcolors.c	(revision 39455)
+++ trunk/Ohana/src/opihi/dvo/fitcolors.c	(revision 39457)
@@ -14,5 +14,4 @@
   int mode[4];
   int Nsecfilt, status;
-  void *oldsignal;
   char *cmd, *outcmd, *camera;
   char name[64], filename[64], plotname[64], label[64];
@@ -40,7 +39,4 @@
   colorFit = NULL;
   deltaFit = NULL;
-
-  oldsignal = signal (SIGINT, handle_interrupt);
-  interrupt = FALSE;
 
   /* load photcode information */
@@ -199,4 +195,6 @@
     graphdata.ptype = 2;
   }
+
+  struct sigaction *old_sigaction = SetInterrupt();
 
   /*** generate the color-color vectors for the pairs ***/
@@ -357,5 +355,5 @@
   if (colorFit != NULL) free (colorFit);
   if (deltaFit != NULL) free (deltaFit);
-  signal (SIGINT, oldsignal);
+  ClearInterrupt (old_sigaction);
   return (TRUE);
 
@@ -381,5 +379,6 @@
   DeleteVector (xvec);
   DeleteVector (yvec);
-  signal (SIGINT, oldsignal);
+  ClearInterrupt (old_sigaction);
+
   return (FALSE);
 }
Index: trunk/Ohana/src/opihi/dvo/fitsed.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/fitsed.c	(revision 39455)
+++ trunk/Ohana/src/opihi/dvo/fitsed.c	(revision 39457)
@@ -27,5 +27,4 @@
   int N, done, Nfit;
   int status;
-  void *oldsignal;
   char name[64], line[1024], key[20];
   float *fitmags, *fiterrs, *wavecode, *vegaToAB;
@@ -48,4 +47,5 @@
   SEDtableRow sourceValue, sourceError;
   SEDfit minFit, testFit;
+  struct sigaction *old_sigaction = NULL;
 
   /* defaults */
@@ -74,7 +74,4 @@
   fiterrs = NULL;
   fitmags = NULL;
-
-  oldsignal = signal (SIGINT, handle_interrupt);
-  interrupt = FALSE;
 
   /* load photcode information */
@@ -184,6 +181,7 @@
   /* loop over regions, extract data for each region */
   // XXX add interrupt checks
+  old_sigaction = SetInterrupt();
   gprint (GP_ERR, "using "OFF_T_FMT" possible regions\n",  skylist[0].Nregions);
-  for (k = 0; k < skylist[0].Nregions; k++) {
+  for (k = 0; (k < skylist[0].Nregions) && !interrupt; k++) {
     /* lock, load, unlock catalog */
     dvo_catalog_init (&catalog, TRUE);
@@ -377,5 +375,5 @@
   if (sourceError.mags != NULL) free (sourceError.mags);
 
-  signal (SIGINT, oldsignal);
+  ClearInterrupt (old_sigaction);
   return (status);
 }
Index: trunk/Ohana/src/opihi/dvo/gcat.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/gcat.c	(revision 39455)
+++ trunk/Ohana/src/opihi/dvo/gcat.c	(revision 39457)
@@ -57,6 +57,5 @@
 
   // prepare to handle interrupt signals
-  signal (SIGINT, handle_interrupt);
-  interrupt = FALSE;
+  struct sigaction *old_sigaction = SetInterrupt();
 
   for (i = 0; (i < skylist[0].Nregions) && !interrupt; i++) {
@@ -101,4 +100,5 @@
     set_str_variable ("CATNAME", hostfile);
   }
+  ClearInterrupt (old_sigaction);
 
   return (TRUE);
Index: trunk/Ohana/src/opihi/dvo/gstar.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/gstar.c	(revision 39455)
+++ trunk/Ohana/src/opihi/dvo/gstar.c	(revision 39457)
@@ -876,4 +876,5 @@
 
 void printPhotcodeSequence (Average *average, SecFilt *secfilt, int entry, int type) {
+  OHANA_UNUSED_PARAM(average);
 
   int seq;
Index: trunk/Ohana/src/opihi/dvo/imdata.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/imdata.c	(revision 39455)
+++ trunk/Ohana/src/opihi/dvo/imdata.c	(revision 39457)
@@ -128,6 +128,5 @@
 
   // prepare to handle interrupt signals
-  signal (SIGINT, handle_interrupt);
-  interrupt = FALSE;
+  struct sigaction *old_sigaction = SetInterrupt();
 
   /* for each region file, extract the data of interest in the right time range */
@@ -216,4 +215,5 @@
     dvo_catalog_free (&catalog);
   }
+  ClearInterrupt (old_sigaction);
   
   vec[0].Nelements = N;
Index: trunk/Ohana/src/opihi/dvo/imextract.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/imextract.c	(revision 39455)
+++ trunk/Ohana/src/opihi/dvo/imextract.c	(revision 39457)
@@ -4,7 +4,6 @@
   
   off_t i, j, Nimage;
-  int n, N, Npts, NPTS, last, next, state, Nfields, Nreturn, Ncstack, Nstack;
+  int n, N, Npts, NPTS, last, next, state, Nfields, Nreturn, Nstack;
   char **cstack, name[1024];
-  void *Signal;
 
   Vector **vec;
@@ -57,4 +56,5 @@
 
   // parse the remainder of the line as a boolean math expression
+  unsigned int Ncstack;
   cstack = isolate_elements (argc-next, &argv[next], &Ncstack);
   
@@ -97,6 +97,5 @@
 
   // grab data from all selected sky regions
-  Signal = signal (SIGINT, handle_interrupt);
-  interrupt = FALSE;
+  struct sigaction *old_sigaction = SetInterrupt();
   for (j = 0; (j < Nimage) && !interrupt; j++) {
 
@@ -128,6 +127,6 @@
     }
   }
-  signal (SIGINT, Signal);
-  interrupt = FALSE;
+  ClearInterrupt (old_sigaction);
+
   for (n = 0; n < Nreturn; n++) {
     vec[n][0].Nelements = Npts;
Index: trunk/Ohana/src/opihi/dvo/mextract.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/mextract.c	(revision 39455)
+++ trunk/Ohana/src/opihi/dvo/mextract.c	(revision 39457)
@@ -25,9 +25,8 @@
   
   off_t i, j, k, m; // used for counter averages and measures
-  int n, N, Npts, NPTS, last, next, state, Nfields, Nreturn, Ncstack, Nstack;
+  int n, N, Npts, NPTS, last, next, state, Nfields, Nreturn, Nstack;
   int Nsecfilt, VERBOSE, loadImages;
   char **cstack, name[1024];
   dbValue *values;
-  void *Signal;
 
   Catalog catalog;
@@ -115,4 +114,5 @@
 
   // parse the remainder of the line as a boolean math expression
+  unsigned int Ncstack;
   cstack = isolate_elements (argc-next, &argv[next], &Ncstack);
   
@@ -217,8 +217,5 @@
 
   // grab data from all selected sky regions
-  Signal = signal (SIGINT, handle_interrupt);
-  interrupt = FALSE;
-
-  // fprintf (stderr, "done setup...");
+  struct sigaction *old_sigaction = SetInterrupt();
 
   for (i = 0; (i < skylist[0].Nregions) && !interrupt; i++) {
@@ -310,5 +307,5 @@
     // dbStackFreeReset ();
   }
-  signal (SIGINT, Signal);
+  ClearInterrupt (old_sigaction);
   interrupt = FALSE;
 
Index: trunk/Ohana/src/opihi/dvo/mmatch.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/mmatch.c	(revision 39455)
+++ trunk/Ohana/src/opihi/dvo/mmatch.c	(revision 39457)
@@ -14,5 +14,4 @@
   int VERBOSE;
   char name[1024];
-  void *Signal;
   float RADIUS;
 
@@ -237,6 +236,5 @@
 
   // grab data from all selected sky regions
-  Signal = signal (SIGINT, handle_interrupt);
-  interrupt = FALSE;
+  struct sigaction *old_sigaction = SetInterrupt();
   for (i = 0; (i < skylist[0].Nregions) && !interrupt; i++) {
 
@@ -331,6 +329,5 @@
     dvo_catalog_free (&catalog);
   }
-  signal (SIGINT, Signal);
-  interrupt = FALSE;
+  ClearInterrupt (old_sigaction);
 
   for (n = 0; n < Nfields; n++) {
Index: trunk/Ohana/src/opihi/dvo/mmextract.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/mmextract.c	(revision 39455)
+++ trunk/Ohana/src/opihi/dvo/mmextract.c	(revision 39457)
@@ -6,10 +6,9 @@
   off_t i, j, k, m;
   int n, N, Npts, NPTS, last, next, state;
-  int Nfields, Nreturn, Nreturn_base, Ncstack1, Ncstack2, Nstack1, Nstack2;
+  int Nfields, Nreturn, Nreturn_base, Nstack1, Nstack2;
   int Nwhere, Iwhere, Nmatch, Imatch, NTABLE, Nt1, Nt2, n1, n2;
   int Nsecfilt, VERBOSE, loadImages;
   char **cstack1, **cstack2, name1[1024], name2[1024];
   dbValue *values, **table1, **table2;
-  void *Signal;
 
   Catalog catalog;
@@ -102,4 +101,5 @@
 
   // parse the 'where' and 'matched to' segments of the line as boolean math expressions
+  unsigned int Ncstack1, Ncstack2;
   cstack1 = isolate_elements (Nwhere, &argv[Iwhere], &Ncstack1);
   cstack2 = isolate_elements (Nmatch, &argv[Imatch], &Ncstack2);
@@ -178,6 +178,6 @@
 
   // grab data from all selected sky regions
-  Signal = signal (SIGINT, handle_interrupt);
-  interrupt = FALSE;
+  struct sigaction *old_sigaction = SetInterrupt();
+
   for (i = 0; (i < skylist[0].Nregions) && !interrupt; i++) {
     /* lock, load, unlock catalog */
@@ -286,6 +286,5 @@
     // dbStackFreeReset ();
   }
-  signal (SIGINT, Signal);
-  interrupt = FALSE;
+  ClearInterrupt (old_sigaction);
 
   // free excess memory
Index: trunk/Ohana/src/opihi/dvo/objectcoverage.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/objectcoverage.c	(revision 39455)
+++ trunk/Ohana/src/opihi/dvo/objectcoverage.c	(revision 39457)
@@ -174,9 +174,9 @@
   Nsecfilt = GetPhotcodeNsecfilt();
   // grab data from all selected sky regions
-  signal (SIGINT, handle_interrupt);
-  interrupt = FALSE;
 
   /* load region corresponding to selection above */
   if ((skylist = SelectRegions (selection)) == NULL) goto escape;
+
+  struct sigaction *old_sigaction = SetInterrupt();
 
   /* loop over regions, extract data for each region */
@@ -224,4 +224,5 @@
     }
   }
+  ClearInterrupt (old_sigaction);
   return (TRUE);
 
Index: trunk/Ohana/src/opihi/dvo/paverage.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/paverage.c	(revision 39455)
+++ trunk/Ohana/src/opihi/dvo/paverage.c	(revision 39457)
@@ -99,6 +99,5 @@
 
   // prepare to handle interrupt signals
-  signal (SIGINT, handle_interrupt);
-  interrupt = FALSE;
+  struct sigaction *old_sigaction = SetInterrupt();
 
   Nloaded = 0;
@@ -154,4 +153,5 @@
     dvo_catalog_free (&catalog);
   }
+  ClearInterrupt (old_sigaction);
   if (Npts > 0) {
     KapaPrepPlot (kapa, Npts, &graphmode);
Index: trunk/Ohana/src/opihi/dvo/pmeasure.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/pmeasure.c	(revision 39455)
+++ trunk/Ohana/src/opihi/dvo/pmeasure.c	(revision 39457)
@@ -172,6 +172,5 @@
 
   // prepare to handle interrupt signals
-  signal (SIGINT, handle_interrupt);
-  interrupt = FALSE;
+  struct sigaction *old_sigaction = SetInterrupt();
 
   Nloaded = 0;
@@ -240,4 +239,6 @@
     dvo_catalog_free (&catalog);
   }
+  ClearInterrupt (old_sigaction);
+
   if (Npts > 0) {
     KapaPrepPlot (kapa, Npts, &graphmode);
Index: trunk/Ohana/src/opihi/dvo/procks.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/procks.c	(revision 39455)
+++ trunk/Ohana/src/opihi/dvo/procks.c	(revision 39457)
@@ -74,5 +74,5 @@
     NROCKS = 100;
     ALLOCATE (rocks, Rocks, NROCKS);
-    for (i = 0; fscanf (f, "%lf %lf %d%lf%lf%lf %d%lf%lf%lf %d%lf%lf%lf", 
+    for (i = 0; fscanf (f, "%lf %lf %u%lf%lf%lf %u%lf%lf%lf %u%lf%lf%lf", 
 			&rocks[i].X[0], &rocks[i].Y[0], 
 			&rocks[i].t[0], &rocks[i].ra[0], &rocks[i].dec[0], &rocks[i].mag[0], 
Index: trunk/Ohana/src/opihi/dvo/showtile.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/showtile.c	(revision 39455)
+++ trunk/Ohana/src/opihi/dvo/showtile.c	(revision 39457)
@@ -4,4 +4,5 @@
 
 int showtile (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argv);
 
   int kapa, Nd, N, NPTS, status, i, InPic;
Index: trunk/Ohana/src/opihi/dvo/skycat.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/skycat.c	(revision 39455)
+++ trunk/Ohana/src/opihi/dvo/skycat.c	(revision 39457)
@@ -71,6 +71,5 @@
 
   // prepare to handle interrupt signals
-  signal (SIGINT, handle_interrupt);
-  interrupt = FALSE;
+  struct sigaction *old_sigaction = SetInterrupt();
 
   for (i = 0; (i < Nregions) && !interrupt; i++) {
@@ -113,4 +112,5 @@
     }
   }
+  ClearInterrupt (old_sigaction);
 
   gprint (GP_ERR, "plotting %d catalogs\n", Npts/8);
Index: trunk/Ohana/src/opihi/dvo/version.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/version.c	(revision 39455)
+++ trunk/Ohana/src/opihi/dvo/version.c	(revision 39457)
@@ -3,4 +3,6 @@
 
 int version (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argc);
+  OHANA_UNUSED_PARAM(argv);
 
   char *tmp;
Index: trunk/Ohana/src/opihi/include/dvoshell.h
===================================================================
--- trunk/Ohana/src/opihi/include/dvoshell.h	(revision 39455)
+++ trunk/Ohana/src/opihi/include/dvoshell.h	(revision 39457)
@@ -81,7 +81,5 @@
 void          compare               PROTO((Catalog *catlog1, Catalog *catlog2, Vector *rvec,  Vector *dvec,  Vector *mvec, Vector *drvec, Vector *ddvec, Vector *dmvec, double radius));
 void          cprecess              PROTO((Average *average, off_t Naverage, double in_epoch, double out_epoch));
-void          image_subset          PROTO((Image *image, off_t Nimage, off_t **Subset, off_t *Nsubset, SkyRegionSelection *selection, unsigned long int tzero, double trange, int TimeSelect));
 off_t         match_image           PROTO((Image *image, off_t Nimage, unsigned int T, short int S));
-off_t         match_image_subset    PROTO((Image *image, off_t *subset, off_t Nsubset, unsigned int T, short int S));
 void          print_value           PROTO((double value, short int ival));
 CMPstars     *cmpReadFits           PROTO((FILE *f, off_t *nstars));
Index: trunk/Ohana/src/opihi/include/shell.h
===================================================================
--- trunk/Ohana/src/opihi/include/shell.h	(revision 39455)
+++ trunk/Ohana/src/opihi/include/shell.h	(revision 39457)
@@ -132,4 +132,6 @@
 #endif
 
+struct sigaction *SetInterrupt          PROTO((void));
+int           ClearInterrupt            PROTO((struct sigaction *old_sigaction));
 void          handle_interrupt      	PROTO((int));
 char        **command_completer     	PROTO((const char *, int, int));
Index: trunk/Ohana/src/opihi/lib.data/hermitian.c
===================================================================
--- trunk/Ohana/src/opihi/lib.data/hermitian.c	(revision 39455)
+++ trunk/Ohana/src/opihi/lib.data/hermitian.c	(revision 39457)
@@ -3,118 +3,120 @@
 double hermitian_polynomial (double x, int order) {
   double value;
-    switch (order) {
-      case 0:
-	value = hermitian_00(x);
-	break;
-      case 1:
-	value = hermitian_01(x);
-	break;
-      case 2:
-	value = hermitian_02(x);
-	break;
-      case 3:
-	value = hermitian_03(x);
-	break;
-      case 4:
-	value = hermitian_04(x);
-	break;
-      case 5:
-	value = hermitian_05(x);
-	break;
-      case 6:
-	value = hermitian_06(x);
-	break;
-      case 7:
-	value = hermitian_07(x);
-	break;
-      case 8:
-	value = hermitian_08(x);
-	break;
-      case 9:
-	value = hermitian_09(x);
-	break;
-      case 10:
-	value = hermitian_10(x);
-	break;
-      default:
-	value = NAN;
-	break;
-    }
-    return value;
+  switch (order) {
+    case 0:
+      value = hermitian_00(x);
+      break;
+    case 1:
+      value = hermitian_01(x);
+      break;
+    case 2:
+      value = hermitian_02(x);
+      break;
+    case 3:
+      value = hermitian_03(x);
+      break;
+    case 4:
+      value = hermitian_04(x);
+      break;
+    case 5:
+      value = hermitian_05(x);
+      break;
+    case 6:
+      value = hermitian_06(x);
+      break;
+    case 7:
+      value = hermitian_07(x);
+      break;
+    case 8:
+      value = hermitian_08(x);
+      break;
+    case 9:
+      value = hermitian_09(x);
+      break;
+    case 10:
+      value = hermitian_10(x);
+      break;
+    default:
+      value = NAN;
+      break;
+  }
+  return value;
 }
 
 double hermitian_00(double x) {
-    double value;
-    // H_0(x) = 1
-    value = 1;
-    return value;
+  OHANA_UNUSED_PARAM(x);
+
+  double value;
+  // H_0(x) = 1
+  value = 1;
+  return value;
 }
 double hermitian_01(double x) {
-    double value;
-    // H_1(x) = x
-    value = x;
-    return value;
+  double value;
+  // H_1(x) = x
+  value = x;
+  return value;
 }
 double hermitian_02(double x) {
-    double value, x2;
-    // H_2(x) = x^2-1
-    x2 = x*x;
-    value = x2 - 1.0;
-    return value;
+  double value, x2;
+  // H_2(x) = x^2-1
+  x2 = x*x;
+  value = x2 - 1.0;
+  return value;
 }
 double hermitian_03(double x) {
-    double value, x2;
-    // H_3(x) = x^3-3x
-    x2 = x*x;
-    value = x*(x2 - 3.0);
-    return value;
+  double value, x2;
+  // H_3(x) = x^3-3x
+  x2 = x*x;
+  value = x*(x2 - 3.0);
+  return value;
 }
 double hermitian_04(double x) {
-    double value, x2;
-    // H_4(x) = x^4-6x^2+3
-    x2 = x*x;
-    value = (x2 - 6.0)*x2 + 3.0;
-    return value;
+  double value, x2;
+  // H_4(x) = x^4-6x^2+3
+  x2 = x*x;
+  value = (x2 - 6.0)*x2 + 3.0;
+  return value;
 }
 double hermitian_05(double x) {
-    double value, x2;
-    // H_5(x) = x^5-10x^3+15x
-    x2 = x*x;
-    value = ((x2 - 10.0)*x2 + 15.0)*x;
-    return value;
+  double value, x2;
+  // H_5(x) = x^5-10x^3+15x
+  x2 = x*x;
+  value = ((x2 - 10.0)*x2 + 15.0)*x;
+  return value;
 }
 double hermitian_06(double x) {
-    double value, x2;
-    // H_6(x) = x^6-15x^4+45x^2-15
-    x2 = x*x;
-    value = (((x2 - 15.0)*x2 + 45.0)*x2) - 15.0;
-    return value;
+  double value, x2;
+  // H_6(x) = x^6-15x^4+45x^2-15
+  x2 = x*x;
+  value = (((x2 - 15.0)*x2 + 45.0)*x2) - 15.0;
+  return value;
 }
 double hermitian_07(double x) {
-    double value, x2;
-    // H_7(x) = x^7-21x^5+105x^3-105x
-    x2 = x*x;
-    value = (((x2 - 21.0)*x2+105.0)*x2 - 105.0)*x;
-    return value;
+  double value, x2;
+  // H_7(x) = x^7-21x^5+105x^3-105x
+  x2 = x*x;
+  value = (((x2 - 21.0)*x2+105.0)*x2 - 105.0)*x;
+  return value;
 }
 double hermitian_08(double x) {
-    double value, x2;
-    // H_8(x) = x^8-28x^6+210x^4-420x^2+105
-    x2 = x*x;
-    value = ((((x2 - 28.0)*x2 + 210.0)*x2 - 420.0)*x2 + 105.0);
-    return value;
+  double value, x2;
+  // H_8(x) = x^8-28x^6+210x^4-420x^2+105
+  x2 = x*x;
+  value = ((((x2 - 28.0)*x2 + 210.0)*x2 - 420.0)*x2 + 105.0);
+  return value;
 }
 double hermitian_09(double x) {
-    double value, x2;
-    // H_9(x) = x^9-36x^7+378x^5-1260x^3+945x
-    x2 = x*x;
-    value = ((((x2 - 36.0)*x2 + 378.0)*x2 - 1260.0)*x2 + 945.0)*x;
-    return value;
+  double value, x2;
+  // H_9(x) = x^9-36x^7+378x^5-1260x^3+945x
+  x2 = x*x;
+  value = ((((x2 - 36.0)*x2 + 378.0)*x2 - 1260.0)*x2 + 945.0)*x;
+  return value;
 }
 double hermitian_10(double x) {
-    double value, x2;
-    // H_{10}(x) = x^{10}-45x^8+630x^6-3150x^4+4725x^2-945 
-    x2 = x*x;
-    value = (((((x2 - 45.0)*x2 + 630.0)*x2 - 3150.0)*x2 + 4725.0)*x2 - 945.0);
-    return value;
+  double value, x2;
+  // H_{10}(x) = x^{10}-45x^8+630x^6-3150x^4+4725x^2-945 
+  x2 = x*x;
+  value = (((((x2 - 45.0)*x2 + 630.0)*x2 - 3150.0)*x2 + 4725.0)*x2 - 945.0);
+  return value;
 }
Index: trunk/Ohana/src/opihi/lib.shell/CommandOps.c
===================================================================
--- trunk/Ohana/src/opihi/lib.shell/CommandOps.c	(revision 39455)
+++ trunk/Ohana/src/opihi/lib.shell/CommandOps.c	(revision 39457)
@@ -151,4 +151,5 @@
 /* tell readline to use out command_generator rather than basic completion */
 char **command_completer (const char *text, int start, int end) {
+  OHANA_UNUSED_PARAM(end);
   
   char **matches;
Index: trunk/Ohana/src/opihi/lib.shell/VectorIO.c
===================================================================
--- trunk/Ohana/src/opihi/lib.shell/VectorIO.c	(revision 39455)
+++ trunk/Ohana/src/opihi/lib.shell/VectorIO.c	(revision 39457)
@@ -81,4 +81,7 @@
   }
   fprintf (stderr, "\n");
+# else
+  OHANA_UNUSED_PARAM(table);
+  OHANA_UNUSED_PARAM(message);
 # endif
   return TRUE;
@@ -99,4 +102,7 @@
   }
   fprintf (stderr, "\n");
+# else
+  OHANA_UNUSED_PARAM(table);
+  OHANA_UNUSED_PARAM(message);
 # endif
   return TRUE;
Index: trunk/Ohana/src/opihi/lib.shell/dvomath.c
===================================================================
--- trunk/Ohana/src/opihi/lib.shell/dvomath.c	(revision 39455)
+++ trunk/Ohana/src/opihi/lib.shell/dvomath.c	(revision 39457)
@@ -16,5 +16,5 @@
 char *dvomath (int argc, char **argv, int *size, int validsize) {
   
-  int  i, Nstack, Ncstack;
+  int  i, Nstack;
   char   **cstack, *outname;
   StackVar *stack;
@@ -27,4 +27,5 @@
 
   /* take char array with expression, convert to important elements */
+  unsigned int Ncstack;
   cstack = isolate_elements (argc, argv, &Ncstack); 
 
Index: trunk/Ohana/src/opihi/lib.shell/exec_loop.c
===================================================================
--- trunk/Ohana/src/opihi/lib.shell/exec_loop.c	(revision 39455)
+++ trunk/Ohana/src/opihi/lib.shell/exec_loop.c	(revision 39457)
@@ -3,5 +3,4 @@
 int exec_loop (Macro *loop) {
 
-  void *Signal;
   int j, status, ThisList;
   char *line;
@@ -17,6 +16,5 @@
 
   /* set up interrupts */
-  Signal = signal (SIGINT, handle_interrupt);
-  interrupt = FALSE;
+  struct sigaction *old_sigaction = SetInterrupt();
 
   /* process the list */
@@ -32,5 +30,5 @@
     if (loop_break || loop_last || loop_next) break;
   }
-  signal (SIGINT, Signal);
+  ClearInterrupt (old_sigaction);
 
   /* free remaining lines on the list, free the list, decrement the shell level */
Index: trunk/Ohana/src/opihi/lib.shell/interrupt.c
===================================================================
--- trunk/Ohana/src/opihi/lib.shell/interrupt.c	(revision 39455)
+++ trunk/Ohana/src/opihi/lib.shell/interrupt.c	(revision 39457)
@@ -7,9 +7,10 @@
 
 void handle_interrupt (int input) {
+  OHANA_UNUSED_PARAM(input);
   
   char string[64];
   int Nask;
 
-  signal (SIGINT, SIG_IGN);
+  // signal (SIGINT, SIG_IGN);
 
   Nask = 0;
@@ -31,5 +32,5 @@
     if ((string[0] == 'y') || (string[0] == 'Y')) {
       interrupt = FALSE;
-      signal (SIGINT, handle_interrupt);
+      // signal (SIGINT, handle_interrupt);
       Nint = 0;
       return;
@@ -38,5 +39,5 @@
     if ((string[0] == 'n') || (string[0] == 'N')) {
       interrupt = TRUE;
-      signal (SIGINT, handle_interrupt);
+      // signal (SIGINT, handle_interrupt);
       Nint = 0;
       return;
@@ -45,5 +46,5 @@
     if (Nask > 3) {
       interrupt = TRUE;
-      signal (SIGINT, handle_interrupt);
+      // signal (SIGINT, handle_interrupt);
       Nint = 0;
       return;
@@ -52,2 +53,41 @@
 
 }
+
+struct sigaction *SetInterrupt () {
+
+  struct sigaction  new_sigaction;
+  struct sigaction *old_sigaction;
+
+  ALLOCATE (old_sigaction, struct sigaction, 1);
+
+  new_sigaction.sa_handler = handle_interrupt;
+  new_sigaction.sa_flags = 0;
+
+  int sigstat = sigaction (SIGINT, &new_sigaction, old_sigaction);
+  if (sigstat) {
+    perror ("failed to set signal handler: ");
+    free (old_sigaction);
+    return NULL;
+  }
+
+  interrupt = FALSE;
+  return old_sigaction;
+}
+
+int ClearInterrupt (struct sigaction *old_sigaction) {
+
+  // interrupt = FALSE;
+
+  if (!old_sigaction) return TRUE;
+
+  struct sigaction new_sigaction;
+
+  if (sigaction (SIGINT, old_sigaction, &new_sigaction)) {
+    perror ("failed to reset signal handler: ");
+    FREE (old_sigaction);
+    return FALSE;
+  }
+  FREE (old_sigaction);
+
+  return TRUE;
+}
Index: trunk/Ohana/src/opihi/lib.shell/macro_edit.c
===================================================================
--- trunk/Ohana/src/opihi/lib.shell/macro_edit.c	(revision 39455)
+++ trunk/Ohana/src/opihi/lib.shell/macro_edit.c	(revision 39457)
@@ -2,4 +2,6 @@
 
 int macro_edit (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argc);
+  OHANA_UNUSED_PARAM(argv);
 
   gprint (GP_ERR, "this function is not implemented yet\n");
Index: trunk/Ohana/src/opihi/lib.shell/macro_read.c
===================================================================
--- trunk/Ohana/src/opihi/lib.shell/macro_read.c	(revision 39455)
+++ trunk/Ohana/src/opihi/lib.shell/macro_read.c	(revision 39457)
@@ -2,4 +2,6 @@
 
 int macro_read (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argc);
+  OHANA_UNUSED_PARAM(argv);
 
   gprint (GP_ERR, "this function is not implemented yet\n");
Index: trunk/Ohana/src/opihi/lib.shell/macro_write.c
===================================================================
--- trunk/Ohana/src/opihi/lib.shell/macro_write.c	(revision 39455)
+++ trunk/Ohana/src/opihi/lib.shell/macro_write.c	(revision 39457)
@@ -2,4 +2,6 @@
 
 int macro_write (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argc);
+  OHANA_UNUSED_PARAM(argv);
 
   gprint (GP_ERR, "this function is not implemented yet\n");
Index: trunk/Ohana/src/opihi/lib.shell/multicommand.c
===================================================================
--- trunk/Ohana/src/opihi/lib.shell/multicommand.c	(revision 39455)
+++ trunk/Ohana/src/opihi/lib.shell/multicommand.c	(revision 39457)
@@ -65,4 +65,5 @@
   done = FALSE;
   status = TRUE;
+  interrupt = FALSE;
   while (!done) {
     q = strchr (p, ';');
Index: trunk/Ohana/src/opihi/mana/mana.c.in
===================================================================
--- trunk/Ohana/src/opihi/mana/mana.c.in	(revision 39455)
+++ trunk/Ohana/src/opihi/mana/mana.c.in	(revision 39457)
@@ -9,4 +9,6 @@
 /* program-dependent initialization */
 void program_init (int *argc, char **argv) {
+  OHANA_UNUSED_PARAM(argc);
+  OHANA_UNUSED_PARAM(argv);
   
   auto_break = TRUE;
Index: trunk/Ohana/src/opihi/mana/version.c
===================================================================
--- trunk/Ohana/src/opihi/mana/version.c	(revision 39455)
+++ trunk/Ohana/src/opihi/mana/version.c	(revision 39457)
@@ -3,4 +3,6 @@
 
 int version (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argc);
+  OHANA_UNUSED_PARAM(argv);
 
   char *tmp;
Index: trunk/Ohana/src/opihi/pantasks/ListenClients.c
===================================================================
--- trunk/Ohana/src/opihi/pantasks/ListenClients.c	(revision 39455)
+++ trunk/Ohana/src/opihi/pantasks/ListenClients.c	(revision 39457)
@@ -68,4 +68,5 @@
 /* select for messages from the current clients; wait for 0.5s before updating client list */
 void *ListenClients (void *data) {
+  OHANA_UNUSED_PARAM(data);
   
   int i, Ncurrent, Nmax, status, Nread;
Index: trunk/Ohana/src/opihi/pantasks/controller_machines.c
===================================================================
--- trunk/Ohana/src/opihi/pantasks/controller_machines.c	(revision 39455)
+++ trunk/Ohana/src/opihi/pantasks/controller_machines.c	(revision 39457)
@@ -2,4 +2,5 @@
 
 int controller_machines (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argv);
 
   int status;
Index: trunk/Ohana/src/opihi/pantasks/controller_threads.c
===================================================================
--- trunk/Ohana/src/opihi/pantasks/controller_threads.c	(revision 39455)
+++ trunk/Ohana/src/opihi/pantasks/controller_threads.c	(revision 39457)
@@ -13,4 +13,5 @@
 
 void *CheckControllerThread (void *data) {
+  OHANA_UNUSED_PARAM(data);
 
   char log_stdout[128], log_stderr[128];
Index: trunk/Ohana/src/opihi/pantasks/controller_version.c
===================================================================
--- trunk/Ohana/src/opihi/pantasks/controller_version.c	(revision 39455)
+++ trunk/Ohana/src/opihi/pantasks/controller_version.c	(revision 39457)
@@ -2,4 +2,5 @@
 
 int controller_version (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argv);
 
   int status;
Index: trunk/Ohana/src/opihi/pantasks/invalid.c
===================================================================
--- trunk/Ohana/src/opihi/pantasks/invalid.c	(revision 39455)
+++ trunk/Ohana/src/opihi/pantasks/invalid.c	(revision 39457)
@@ -2,4 +2,5 @@
 
 int invalid (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argc);
 
   gprint (GP_ERR, "%s is not valid for the pantasks client\n", argv[0]);
Index: trunk/Ohana/src/opihi/pantasks/jobs_and_tasks_thread.c
===================================================================
--- trunk/Ohana/src/opihi/pantasks/jobs_and_tasks_thread.c	(revision 39455)
+++ trunk/Ohana/src/opihi/pantasks/jobs_and_tasks_thread.c	(revision 39457)
@@ -24,4 +24,5 @@
 
 void *CheckJobsAndTasksThread (void *data) {
+  OHANA_UNUSED_PARAM(data);
 
   char log_stdout[128], log_stderr[128];
Index: trunk/Ohana/src/opihi/pantasks/pantasks.c.in
===================================================================
--- trunk/Ohana/src/opihi/pantasks/pantasks.c.in	(revision 39455)
+++ trunk/Ohana/src/opihi/pantasks/pantasks.c.in	(revision 39457)
@@ -9,4 +9,6 @@
 /* program-dependent initialization */
 void program_init (int *argc, char **argv) {
+  OHANA_UNUSED_PARAM(argc);
+  OHANA_UNUSED_PARAM(argv);
   
   pthread_t JobsAndTasksThread;
Index: trunk/Ohana/src/opihi/pantasks/pantasks_client.c.in
===================================================================
--- trunk/Ohana/src/opihi/pantasks/pantasks_client.c.in	(revision 39455)
+++ trunk/Ohana/src/opihi/pantasks/pantasks_client.c.in	(revision 39457)
@@ -9,4 +9,6 @@
 /* program-dependent initialization */
 void program_init (int *argc, char **argv) {
+  OHANA_UNUSED_PARAM(argc);
+  OHANA_UNUSED_PARAM(argv);
   
   auto_break = TRUE;
Index: trunk/Ohana/src/opihi/pantasks/pantasks_server.c.in
===================================================================
--- trunk/Ohana/src/opihi/pantasks/pantasks_server.c.in	(revision 39455)
+++ trunk/Ohana/src/opihi/pantasks/pantasks_server.c.in	(revision 39457)
@@ -149,5 +149,8 @@
 /* these are needed to resolve symbols expected by libshell.so */
 void welcome () { }
-void program_init (int *argc, char **argv) {}
+void program_init (int *argc, char **argv) {
+  OHANA_UNUSED_PARAM(argc);
+  OHANA_UNUSED_PARAM(argv);
+}
 
 // I need to do things in a different order here to have config / freopen / gprint sequenced correctly
Index: trunk/Ohana/src/opihi/pantasks/run.c
===================================================================
--- trunk/Ohana/src/opihi/pantasks/run.c	(revision 39455)
+++ trunk/Ohana/src/opihi/pantasks/run.c	(revision 39457)
@@ -9,4 +9,5 @@
 
 int run (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argv);
 
   if (argc != 1) {
Index: trunk/Ohana/src/opihi/pantasks/server_connect.c
===================================================================
--- trunk/Ohana/src/opihi/pantasks/server_connect.c	(revision 39455)
+++ trunk/Ohana/src/opihi/pantasks/server_connect.c	(revision 39457)
@@ -2,4 +2,5 @@
 
 int server_connect (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argv);
 
   int server;
Index: trunk/Ohana/src/opihi/pantasks/server_disconnect.c
===================================================================
--- trunk/Ohana/src/opihi/pantasks/server_disconnect.c	(revision 39455)
+++ trunk/Ohana/src/opihi/pantasks/server_disconnect.c	(revision 39457)
@@ -2,4 +2,5 @@
 
 int server_disconnect (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argv);
 
   int server;
Index: trunk/Ohana/src/opihi/pantasks/server_run.c
===================================================================
--- trunk/Ohana/src/opihi/pantasks/server_run.c	(revision 39455)
+++ trunk/Ohana/src/opihi/pantasks/server_run.c	(revision 39457)
@@ -2,4 +2,5 @@
 
 int server_run (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argv);
 
   if (argc != 1) {
@@ -15,4 +16,5 @@
 
 int server_stop (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argv);
 
   if (argc != 1) {
@@ -26,4 +28,5 @@
 
 int server_halt (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argv);
 
   if (argc != 1) {
Index: trunk/Ohana/src/opihi/pantasks/stop.c
===================================================================
--- trunk/Ohana/src/opihi/pantasks/stop.c	(revision 39455)
+++ trunk/Ohana/src/opihi/pantasks/stop.c	(revision 39457)
@@ -2,4 +2,5 @@
 
 int stop (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argv);
 
   if (argc != 1) {
@@ -16,4 +17,5 @@
 
 int halt (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argv);
 
   if (argc != 1) {
Index: trunk/Ohana/src/opihi/pantasks/thread_locks.c
===================================================================
--- trunk/Ohana/src/opihi/pantasks/thread_locks.c	(revision 39455)
+++ trunk/Ohana/src/opihi/pantasks/thread_locks.c	(revision 39457)
@@ -29,4 +29,5 @@
 
 void ControlLock (const char *func) {
+  OHANA_UNUSED_PARAM(func);
   // fprintf (stderr, "control lock %s\n", func);
   pthread_mutex_lock (&ControlMutex);
@@ -34,4 +35,5 @@
 
 void ControlUnlock (const char *func) {
+  OHANA_UNUSED_PARAM(func);
   // fprintf (stderr, "control unlock %s\n", func);
   pthread_mutex_unlock (&ControlMutex);
Index: trunk/Ohana/src/opihi/pantasks/version.c
===================================================================
--- trunk/Ohana/src/opihi/pantasks/version.c	(revision 39455)
+++ trunk/Ohana/src/opihi/pantasks/version.c	(revision 39457)
@@ -3,4 +3,6 @@
 
 int version (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argc);
+  OHANA_UNUSED_PARAM(argv);
 
   char *tmp;
Index: trunk/Ohana/src/opihi/pclient/check.c
===================================================================
--- trunk/Ohana/src/opihi/pclient/check.c	(revision 39455)
+++ trunk/Ohana/src/opihi/pclient/check.c	(revision 39457)
@@ -2,4 +2,6 @@
 
 int check (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argc);
+  OHANA_UNUSED_PARAM(argv);
 
   /* force a check */
Index: trunk/Ohana/src/opihi/pclient/pclient.c.in
===================================================================
--- trunk/Ohana/src/opihi/pclient/pclient.c.in	(revision 39455)
+++ trunk/Ohana/src/opihi/pclient/pclient.c.in	(revision 39457)
@@ -8,8 +8,11 @@
 
 void dummy_prep_term (int flag) {
+  OHANA_UNUSED_PARAM(flag);
 }
 
 /* program-dependent initialization */
 void program_init (int *argc, char **argv) {
+  OHANA_UNUSED_PARAM(argc);
+  OHANA_UNUSED_PARAM(argv);
   
   auto_break = TRUE;
@@ -80,4 +83,6 @@
 
 void pipe_signal (int signum) {
+  OHANA_UNUSED_PARAM(signum);
+
   Npipe ++;
   if (Npipe > 100) {
Index: trunk/Ohana/src/opihi/pclient/reset.c
===================================================================
--- trunk/Ohana/src/opihi/pclient/reset.c	(revision 39455)
+++ trunk/Ohana/src/opihi/pclient/reset.c	(revision 39457)
@@ -2,4 +2,5 @@
 
 int reset (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argv);
 
   int i, result, waitstatus;
Index: trunk/Ohana/src/opihi/pclient/status.c
===================================================================
--- trunk/Ohana/src/opihi/pclient/status.c	(revision 39455)
+++ trunk/Ohana/src/opihi/pclient/status.c	(revision 39457)
@@ -2,4 +2,5 @@
 
 int status (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argv);
 
   char status_string[64];
Index: trunk/Ohana/src/opihi/pclient/stdout.c
===================================================================
--- trunk/Ohana/src/opihi/pclient/stdout.c	(revision 39455)
+++ trunk/Ohana/src/opihi/pclient/stdout.c	(revision 39457)
@@ -2,4 +2,5 @@
 
 int stdout_pclient (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argv);
 
   if (argc != 1) {
@@ -16,4 +17,5 @@
 
 int stderr_pclient (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argv);
 
   if (argc != 1) {
Index: trunk/Ohana/src/opihi/pclient/version.c
===================================================================
--- trunk/Ohana/src/opihi/pclient/version.c	(revision 39455)
+++ trunk/Ohana/src/opihi/pclient/version.c	(revision 39457)
@@ -3,4 +3,6 @@
 
 int version (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argc);
+  OHANA_UNUSED_PARAM(argv);
 
   char *tmp;
Index: trunk/Ohana/src/opihi/pcontrol/CheckSystem.c
===================================================================
--- trunk/Ohana/src/opihi/pcontrol/CheckSystem.c	(revision 39455)
+++ trunk/Ohana/src/opihi/pcontrol/CheckSystem.c	(revision 39457)
@@ -61,4 +61,5 @@
 
 void *CheckSystem_Threaded (void *data) {
+  OHANA_UNUSED_PARAM(data);
 
   int Njobchecks, Nhostchecks, Ndonejobs;
Index: trunk/Ohana/src/opihi/pcontrol/JobOps.c
===================================================================
--- trunk/Ohana/src/opihi/pcontrol/JobOps.c	(revision 39455)
+++ trunk/Ohana/src/opihi/pcontrol/JobOps.c	(revision 39457)
@@ -208,4 +208,5 @@
 
 IDtype AddJob (char *hostname, JobMode mode, int timeout, int nicelevel, int argc, char **argv, int Nxhosts, char **xhosts) {
+  OHANA_UNUSED_PARAM(timeout);
 
   int JobID;
@@ -215,8 +216,9 @@
 
   job[0].JobID    = NextJobID();
-  if (job[0].JobID < 0) {
-    free (job);
-    return -1;
-  }
+  // XXX this test does not make sense
+  // if (job[0].JobID < 0) {
+  //   free (job);
+  //   return -1;
+  // }
 
   job[0].argc     = argc;
Index: trunk/Ohana/src/opihi/pcontrol/MachineOps.c
===================================================================
--- trunk/Ohana/src/opihi/pcontrol/MachineOps.c	(revision 39455)
+++ trunk/Ohana/src/opihi/pcontrol/MachineOps.c	(revision 39457)
@@ -74,4 +74,5 @@
 // delete a new machine (if not new, return TRUE)
 int DelMachine (char *name) {
+  OHANA_UNUSED_PARAM(name);
 
   return TRUE;
Index: trunk/Ohana/src/opihi/pcontrol/StackOps.c
===================================================================
--- trunk/Ohana/src/opihi/pcontrol/StackOps.c	(revision 39455)
+++ trunk/Ohana/src/opihi/pcontrol/StackOps.c	(revision 39457)
@@ -16,6 +16,6 @@
 
   if (!DEBUG) return;
-  fprintf (stderr, "%s: %p  ", func, stack);
-  fprintf (stderr, "objects: %p  ", stack[0].object);
+  fprintf (stderr, "%s: %p  ", func, (void *) stack);
+  fprintf (stderr, "objects: %p  ", (void *) stack[0].object);
   fprintf (stderr, "Nobjects: %d, NOBJECTS: %d\n", stack[0].Nobject, stack[0].NOBJECT);
 }
Index: trunk/Ohana/src/opihi/pcontrol/machines.c
===================================================================
--- trunk/Ohana/src/opihi/pcontrol/machines.c	(revision 39455)
+++ trunk/Ohana/src/opihi/pcontrol/machines.c	(revision 39457)
@@ -2,4 +2,6 @@
 
 int machines (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argc);
+  OHANA_UNUSED_PARAM(argv);
 
   PrintMachines ();
Index: trunk/Ohana/src/opihi/pcontrol/pcontrol.c.in
===================================================================
--- trunk/Ohana/src/opihi/pcontrol/pcontrol.c.in	(revision 39455)
+++ trunk/Ohana/src/opihi/pcontrol/pcontrol.c.in	(revision 39457)
@@ -11,4 +11,6 @@
 /* program-dependent initialization */
 void program_init (int *argc, char **argv) {
+  OHANA_UNUSED_PARAM(argc);
+  OHANA_UNUSED_PARAM(argv);
   
 # ifdef THREADED  
Index: trunk/Ohana/src/opihi/pcontrol/version.c
===================================================================
--- trunk/Ohana/src/opihi/pcontrol/version.c	(revision 39455)
+++ trunk/Ohana/src/opihi/pcontrol/version.c	(revision 39457)
@@ -3,4 +3,6 @@
 
 int version (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argc);
+  OHANA_UNUSED_PARAM(argv);
 
   char *tmp;
Index: trunk/Ohana/src/photdbc/include/photdbc.h
===================================================================
--- trunk/Ohana/src/photdbc/include/photdbc.h	(revision 39455)
+++ trunk/Ohana/src/photdbc/include/photdbc.h	(revision 39457)
@@ -48,5 +48,5 @@
 double JOIN_RADIUS;
 double UNIQ_RADIUS;
-double DMCAL_MIN;;
+double DMCAL_MIN;
 char   ImageCat[DVO_MAX_PATH];
 char   GSCFILE[DVO_MAX_PATH];
Index: trunk/Ohana/src/photdbc/src/UseBackupForHost.c
===================================================================
--- trunk/Ohana/src/photdbc/src/UseBackupForHost.c	(revision 39455)
+++ trunk/Ohana/src/photdbc/src/UseBackupForHost.c	(revision 39457)
@@ -7,4 +7,5 @@
 // set DATA_USE_BCK for all tables with DATA_ON_BCK and host matches srcHost
 int UseBackupForHost (char *catdir, SkyList *skylist, HostTable *table) {
+  OHANA_UNUSED_PARAM(catdir);
 
   int i;
Index: trunk/Ohana/src/relastro/Makefile
===================================================================
--- trunk/Ohana/src/relastro/Makefile	(revision 39455)
+++ trunk/Ohana/src/relastro/Makefile	(revision 39457)
@@ -41,4 +41,5 @@
 $(SRC)/Shutdown.$(ARCH).o 	     \
 $(SRC)/UpdateChips.$(ARCH).o         \
+$(SRC)/UpdateStacks.$(ARCH).o         \
 $(SRC)/UpdateMosaic.$(ARCH).o        \
 $(SRC)/UpdateObjects.$(ARCH).o       \
@@ -47,4 +48,5 @@
 $(SRC)/UpdateMeasures.$(ARCH).o      \
 $(SRC)/GetAstromError.$(ARCH).o      \
+$(SRC)/MeasFilterTest.$(ARCH).o            \
 $(SRC)/args.$(ARCH).o		     \
 $(SRC)/bcatalog.$(ARCH).o	     \
@@ -120,4 +122,5 @@
 $(SRC)/UpdateMeasures.$(ARCH).o      \
 $(SRC)/GetAstromError.$(ARCH).o      \
+$(SRC)/MeasFilterTest.$(ARCH).o            \
 $(SRC)/args.$(ARCH).o		     \
 $(SRC)/bcatalog.$(ARCH).o	     \
@@ -195,6 +198,5 @@
 $(SRC)/mkpolyterm.$(ARCH).o            \
 $(SRC)/GetAstromError.$(ARCH).o            \
-$(SRC)/ImageOps.$(ARCH).o            \
-$(SRC)/MosaicOps.$(ARCH).o            \
+$(SRC)/MeasFilterTest.$(ARCH).o            \
 $(SRC)/extra.$(ARCH).o            \
 $(SRC)/plotstuff.$(ARCH).o            \
@@ -218,6 +220,5 @@
 $(SRC)/mkpolyterm.$(ARCH).o            \
 $(SRC)/GetAstromError.$(ARCH).o            \
-$(SRC)/ImageOps.$(ARCH).o            \
-$(SRC)/MosaicOps.$(ARCH).o            \
+$(SRC)/MeasFilterTest.$(ARCH).o            \
 $(SRC)/extra.$(ARCH).o            \
 $(SRC)/plotstuff.$(ARCH).o            \
@@ -241,9 +242,15 @@
 $(SRC)/mkpolyterm.$(ARCH).o            \
 $(SRC)/GetAstromError.$(ARCH).o            \
-$(SRC)/ImageOps.$(ARCH).o            \
-$(SRC)/MosaicOps.$(ARCH).o            \
+$(SRC)/MeasFilterTest.$(ARCH).o            \
 $(SRC)/extra.$(ARCH).o            \
 $(SRC)/plotstuff.$(ARCH).o            \
 $(SRC)/fitpoly.$(ARCH).o
+
+# stupid dependencies: 
+# UpdateObjects.c:UpdateObjects_Chips needs
+# ImageOps.c:MeasFilterTiny forces
+# load_images.c:free_astrom_table needs
+# select_images.c
+# MosaicOps.c
 
 $(FITSTK): $(INC)/relastro.h
Index: trunk/Ohana/src/relastro/include/relastro.h
===================================================================
--- trunk/Ohana/src/relastro/include/relastro.h	(revision 39455)
+++ trunk/Ohana/src/relastro/include/relastro.h	(revision 39457)
@@ -88,6 +88,6 @@
   off_t *NMEASURE;	      // allocated Measures per catalog
   int   *index;		      // lookup table catID -> catalog[i]
-  int   *catIDs;	      // lookup table catID <- catalog[i]
-  int    maxID;		      // max catID value to date
+  unsigned int *catIDs;	      // lookup table catID <- catalog[i]
+  unsigned int  maxID;        // max catID value to date
 } CatalogSplitter;
 
@@ -259,4 +259,5 @@
 int    REGION_HOST_ID;
 int    PARALLEL_REGIONS_MANUAL;
+char  *MANUAL_UNIQUER;
 
 int          HOST_ID;
@@ -416,5 +417,6 @@
 int SetSignals (void);
 
-void relastro_client_free ();
+void relastro_free (SkyTable *sky, SkyList *skylist);
+void relastro_client_free (SkyTable *sky, SkyList *skylist);
 
 GSCRegion    *find_regions        PROTO((Image *image, off_t Nimage, int *Nregions, GSCRegion *fullregion));
@@ -438,4 +440,5 @@
 void          initImageBins       PROTO((Catalog *catalog, int Ncatalog, int FULLINIT));
 void          initImages          PROTO((Image *input, off_t *line_number, off_t N));
+void          freeImages          PROTO(());
 void          initMosaicBins      PROTO((Catalog *catalog, int Ncatalog));
 void          initMosaicGrid      PROTO((Image *image, off_t Nimage));
@@ -528,4 +531,5 @@
 int UpdateSimple (Catalog *catalog, int Ncatalog);
 int UpdateChips (Catalog *catalog, int Ncatalog, int Nloop);
+int UpdateStacks (Catalog *catalog, int Ncatalog);
 int UpdateMosaic (Catalog *catalog, int Ncatalog);
 int UpdateMeasures (Catalog *catalog, int Ncatalog);
@@ -552,4 +556,5 @@
 Mosaic *getmosaics (off_t *N);
 void initMosaics (Image *image, off_t Nimage);
+void freeMosaics ();
 StarData *getMosaicRaw (Catalog *catalog, int Ncatalog, off_t mos, off_t *Nstars);
 StarData *getMosaicRef (Catalog *catalog, int Ncatalog, off_t mos, off_t *Nstars);
@@ -588,4 +593,5 @@
 
 int initStarMaps ();
+void freeStarMaps ();
 int updateStarMaps(Catalog *catalog);
 int createStarMapPoints();
@@ -653,5 +659,6 @@
 
 int indexCatalogs (Catalog *catalog, int Ncatalog);
-int catID_and_objID_to_seq (int catID, int objID, int *catSeq, off_t *objSeq);
+int catID_and_objID_to_seq (unsigned int catID, unsigned int objID, int *catSeq, off_t *objSeq);
+void freeCatalogIndexes (int Ncatalog);
 
 int markObjects (Catalog *catalog, int Ncatalog);
@@ -682,4 +689,5 @@
 AstromOffsetTable *get_astrom_table ();
 void put_astrom_table (AstromOffsetTable *myTable);
+void free_astrom_table ();
 
 int fit_map (AstromOffsetMap *map, StarData *raw, StarData *ref, int Npts);
Index: trunk/Ohana/src/relastro/src/BootstrapOps.c
===================================================================
--- trunk/Ohana/src/relastro/src/BootstrapOps.c	(revision 39455)
+++ trunk/Ohana/src/relastro/src/BootstrapOps.c	(revision 39457)
@@ -98,4 +98,5 @@
       myAbort ("invalid option");
   }
+  free (values);
 
   return TRUE;
Index: trunk/Ohana/src/relastro/src/BrightCatalog.c
===================================================================
--- trunk/Ohana/src/relastro/src/BrightCatalog.c	(revision 39455)
+++ trunk/Ohana/src/relastro/src/BrightCatalog.c	(revision 39457)
@@ -358,11 +358,6 @@
     ohana_memcheck (1);
 
-    my_memdump("start of define_bintable");
     gfits_define_bintable_column (&theader, "D", "RA",       "ra",                         "degrees", 1.0, 0.0);
-    my_memdump("after define_bintable RA");
-
     gfits_define_bintable_column (&theader, "D", "DEC",      "dec",                        "degrees", 1.0, 0.0);
-    my_memdump("after define_bintable DEC");
-
     gfits_define_bintable_column (&theader, "E", "MAG_SYS",  "magnitude (sys)",             NULL,    1.0, 0.0);
     gfits_define_bintable_column (&theader, "E", "MAG_CAL",  "magnitude (cal)",             NULL,    1.0, 0.0);
@@ -433,4 +428,8 @@
     // add the columns to the output array
     gfits_set_bintable_column (&theader, &ftable, "RA",   	R,         catalog->Nmeasure);
+
+    fprintf (stderr, "--------------- after set_bintable RA --------------");
+    ohana_memdump_file (stderr, TRUE);
+    
     gfits_set_bintable_column (&theader, &ftable, "DEC",  	D,         catalog->Nmeasure);
     gfits_set_bintable_column (&theader, &ftable, "MAG_SYS",  	M,         catalog->Nmeasure);
@@ -798,5 +797,7 @@
   catalogs->maxID = 0;
   ALLOCATE (catalogs->index, int, catalogs->maxID + 1);
-  for (i = 0; i <= catalogs->maxID; i++) catalogs->index[i] = -1;
+
+  unsigned int ID;
+  for (ID = 0; ID <= catalogs->maxID; ID++) catalogs->index[ID] = -1;
 
   catalogs->Nsecfilt = Nsecfilt;
@@ -807,7 +808,7 @@
   ALLOCATE (catalogs->catalog, Catalog, catalogs->NCATALOG);
 
-  ALLOCATE (catalogs->catIDs,   int,   catalogs->NCATALOG);
-  ALLOCATE (catalogs->NAVERAGE, off_t, catalogs->NCATALOG);
-  ALLOCATE (catalogs->NMEASURE, off_t, catalogs->NCATALOG);
+  ALLOCATE (catalogs->catIDs,   unsigned int, catalogs->NCATALOG);
+  ALLOCATE (catalogs->NAVERAGE, off_t,        catalogs->NCATALOG);
+  ALLOCATE (catalogs->NMEASURE, off_t,        catalogs->NCATALOG);
 
   for (i = 0; i < catalogs->NCATALOG; i++) {
@@ -828,9 +829,20 @@
 int BrightCatalogSplitFree (CatalogSplitter *catalogs) {
 
-  free (catalogs->catIDs);
-  free (catalogs->NAVERAGE);
-  free (catalogs->NMEASURE);
-  free (catalogs->index);
-  free (catalogs);
+# if (0)
+  int i;
+
+  for (i = 0; i < catalogs->NCATALOG; i++) {
+    FREE (catalogs->catalog[i].average);
+    FREE (catalogs->catalog[i].secfilt);
+    FREE (catalogs->catalog[i].measureT);
+  }
+  FREE (catalogs->catalog);
+# endif
+
+  FREE (catalogs->catIDs);
+  FREE (catalogs->NAVERAGE);
+  FREE (catalogs->NMEASURE);
+  FREE (catalogs->index);
+  FREE (catalogs);
   return TRUE;
 }
@@ -844,5 +856,5 @@
 
   // find the max value of catID in this BrightCatalog
-  int catIDmax = 0;
+  unsigned int catIDmax = 0;
   for (i = 0; i < bcatalog->Naverage; i++) {
     catIDmax = MAX(catIDmax, bcatalog->average[i].catID);
@@ -850,14 +862,16 @@
   // XXX validate the measure ID range here
     
-  int maxIDold = catalogs->maxID;
+  unsigned int maxIDold = catalogs->maxID;
   catalogs->maxID = MAX (maxIDold, catIDmax);
     
   // extend the index array and init
   REALLOCATE (catalogs->index, int, catalogs->maxID + 1);
-  for (i = maxIDold + 1; i <= catalogs->maxID; i++) catalogs->index[i] = -1;
+
+  unsigned int id;
+  for (id = maxIDold + 1; id <= catalogs->maxID; id++) catalogs->index[id] = -1;
 
   // identify the new catID values
   for (i = 0; i < bcatalog->Naverage; i++) {
-    int catID = bcatalog->average[i].catID;
+    unsigned int catID = bcatalog->average[i].catID;
     assert (catID > 0);
     assert (catID < catalogs->maxID + 1);
@@ -881,4 +895,5 @@
 
     if (catalogs->Ncatalog >= catalogs->NCATALOG) {
+      int oldNCATALOG = catalogs->NCATALOG;
       catalogs->NCATALOG += 16;
       // fprintf (stderr, "realloc catalogs->catalog: old: %llx  ", (long long) catalogs->catalog);
@@ -894,8 +909,8 @@
       // fprintf (stderr, "new: %llx  -  %llx\n", (long long) catalogs->NMEASURE, (long long) (catalogs->NMEASURE + sizeof(off_t)*catalogs->NCATALOG));
 
-      REALLOCATE (catalogs->catIDs,   int,   catalogs->NCATALOG);
+      REALLOCATE (catalogs->catIDs, unsigned int, catalogs->NCATALOG);
 
       int j;
-      for (j = catalogs->NCATALOG - 16; j < catalogs->NCATALOG; j++) {
+      for (j = oldNCATALOG; j < catalogs->NCATALOG; j++) {
 	dvo_catalog_init (&catalogs->catalog[j], TRUE);
 	catalogs->catIDs[j] = 0;
@@ -917,5 +932,5 @@
   // assign the averages to the corresponding catalog
   for (i = 0; i < bcatalog->Naverage; i++) {
-    int ID = bcatalog->average[i].catID;
+    unsigned int ID = bcatalog->average[i].catID;
     int Nc = catalogs->index[ID];
     assert (Nc > -1);
@@ -942,5 +957,5 @@
   // XXX what about averef and related links?  Do I need them?
   for (i = 0; i < bcatalog->Nmeasure; i++) {
-    int ID = bcatalog->measure[i].catID;
+    unsigned int ID = bcatalog->measure[i].catID;
     int Nc = catalogs->index[ID];
     assert (Nc > -1);
Index: trunk/Ohana/src/relastro/src/FitAstromOps.c
===================================================================
--- trunk/Ohana/src/relastro/src/FitAstromOps.c	(revision 39455)
+++ trunk/Ohana/src/relastro/src/FitAstromOps.c	(revision 39457)
@@ -297,4 +297,5 @@
     median = x[(int)(0.5*Npoints)];
   }
+  free (x);
 
   return median;
Index: trunk/Ohana/src/relastro/src/FitChip.c
===================================================================
--- trunk/Ohana/src/relastro/src/FitChip.c	(revision 39455)
+++ trunk/Ohana/src/relastro/src/FitChip.c	(revision 39457)
@@ -221,10 +221,11 @@
 
   int i, Ns;
-  float dL, dM, dLsum, dLsum2, dMsum, dMsum2, *dR;
-
-  ALLOCATE (dR, float, Nstars);
+  float dL, dM;
+
+  ALLOCATE_PTR (dRvec, double, Nstars);
+  ALLOCATE_PTR (dLvec, double, Nstars);
+  ALLOCATE_PTR (dMvec, double, Nstars);
 
   Ns = 0;
-  dLsum = dLsum2 = dMsum = dMsum2 = 0.0;
   for (i = 0; i < Nstars; i++) {
     if (raw[i].mask) continue;
@@ -235,28 +236,37 @@
     dM = raw[i].M - ref[i].M;
 
-    dLsum  += dL;
-    dLsum2 += dL*dL;
-    dMsum  += dM;
-    dMsum2 += dM*dM;
-
-    dR[Ns] = hypot (dL, dM);
+    dLvec[Ns] = dL;
+    dMvec[Ns] = dM;
+    dRvec[Ns] = hypot (dL, dM);
     Ns++;
   }
 
-  *dLsig = sqrt((dLsum2 / Ns) - SQ(dLsum/Ns));
-  *dMsig = sqrt((dMsum2 / Ns) - SQ(dMsum/Ns));
+  dsort (dLvec, Ns);
+  dsort (dMvec, Ns);
+
+  double Slo, Shi;
+  Slo = VectorFractionInterpolate (dLvec, 0.158655, Ns);
+  Shi = VectorFractionInterpolate (dLvec, 0.841345, Ns);
+  *dLsig = (Shi - Slo) / 2.0;
+  free (dLvec);
+
+  Slo = VectorFractionInterpolate (dMvec, 0.158655, Ns);
+  Shi = VectorFractionInterpolate (dMvec, 0.841345, Ns);
+  *dMsig = (Shi - Slo) / 2.0;
+  free (dMvec);
+
   *nKeep = Ns;
 
   if (Ns < 5) {
     *dRsig = NAN;
-    free  (dR);
+    free  (dRvec);
     return (FALSE);
   }
 
   // for a 2D Gaussian, 40% of the points are within R = 1 sigma
-  fsort (dR, Ns);
-  *dRsig = dR[(int)(0.40*Ns)];
+  dsort (dRvec, Ns);
+  *dRsig = dRvec[(int)(0.40*Ns)];
   
-  free  (dR);
+  free  (dRvec);
   return (TRUE);
 }
Index: trunk/Ohana/src/relastro/src/GetAstromError.c
===================================================================
--- trunk/Ohana/src/relastro/src/GetAstromError.c	(revision 39455)
+++ trunk/Ohana/src/relastro/src/GetAstromError.c	(revision 39457)
@@ -76,11 +76,11 @@
   // weight to ensure the image is tied down to the 2mass frame
 
-  if (has2MASS && LoopWeight2MASS) {
+  if (has2MASS && LoopWeight2MASS && (Nloop >= 0)) {
     dPtotal = dPtotal / LoopWeight2MASS[Nloop];
   }
-  if (is2MASS && LoopWeight2MASS) {
+  if (is2MASS && LoopWeight2MASS && (Nloop >= 0)) {
     dPtotal = dPtotal / LoopWeight2MASS[Nloop];
   }
-  if (isTycho && LoopWeightTycho) {
+  if (isTycho && LoopWeightTycho && (Nloop >= 0)) {
     dPtotal = dPtotal / LoopWeightTycho[Nloop];
   }
Index: trunk/Ohana/src/relastro/src/ImageOps.c
===================================================================
--- trunk/Ohana/src/relastro/src/ImageOps.c	(revision 39455)
+++ trunk/Ohana/src/relastro/src/ImageOps.c	(revision 39457)
@@ -1,4 +1,3 @@
 # include "relastro.h"
-int isGPC1chip (int photcode);
 
 # define USE_IMAGE_ID 1
@@ -10,16 +9,16 @@
 // if we read only a subset of the rows from the Image FITS, LineNumber tells us to which row
 // each image belongs
-static off_t       *LineNumber; // match of subset to full image table
-
-static off_t        *N_onImage;   // number of measurements on image
-static off_t        *N_ONIMAGE;   // allocated number of measurements on image   
-
-static int          *Ncatlist;  // catalogs associated with each image
-static int          *NCATLIST;  // catalogs associated with each image
-static int         **catlist;  // catalogs associated with each image
-
-static IDX_T       **MeasureToImage;     // link from catalog,measure to image
-static IDX_T       **ImageToCatalog;   // catalog which supplied measurement on image
-static IDX_T       **ImageToMeasure;   // measure reference for measurement on image
+static off_t       *LineNumber = NULL; // match of subset to full image table
+
+static off_t        *N_onImage = NULL;   // number of measurements on image
+static off_t        *N_ONIMAGE = NULL;   // allocated number of measurements on image   
+
+static int          *Ncatlist = NULL;  // catalogs associated with each image
+static int          *NCATLIST = NULL;  // catalogs associated with each image
+static int         **catlist  = NULL;  // catalogs associated with each image
+
+static IDX_T       **MeasureToImage = NULL;     // link from catalog,measure to image
+static IDX_T       **ImageToCatalog = NULL;   // catalog which supplied measurement on image
+static IDX_T       **ImageToMeasure = NULL;   // measure reference for measurement on image
 
 // if we search by image ID, we sort (imageIDs, imageIdx) by imageIDs to get a sorted
@@ -27,9 +26,9 @@
 
 # if USE_IMAGE_ID
-static off_t        *imageIDs; // list of all image IDs
-static off_t        *imageIdx; // list of index for image IDs 
+static off_t        *imageIDs = NULL; // list of all image IDs
+static off_t        *imageIdx = NULL; // list of index for image IDs 
 
 // as an alternative, we generate imageSeq, which directly maps imageID -> seq
-static off_t        *imageSeq; // list of index for image IDs 
+static off_t        *imageSeq = NULL; // list of index for image IDs 
 
 // MAX_ID requires 512M to store the image index
@@ -120,4 +119,20 @@
   }
 # endif
+}
+
+void freeImages () {
+
+  FREE (LineNumber);
+
+# if USE_IMAGE_ID
+  FREE (imageIDs);
+  FREE (imageIdx);
+  FREE (imageSeq);
+# else
+  FREE (start);
+  FREE (stop);
+# endif
+
+  free_astrom_table();
 }
 
@@ -197,15 +212,23 @@
 
   for (i = 0; i < Ncatalog; i++) {
-    free (MeasureToImage[i]);
-  }
-  free (MeasureToImage);
+    FREE (MeasureToImage[i]);
+  }
+  FREE (MeasureToImage);
   for (i = 0; i < Nimage; i++) {
-    if (ImageToCatalog[i]) { free (ImageToCatalog[i]); }
-    if (ImageToMeasure[i]) { free (ImageToMeasure[i]); }
-  }
-  free (ImageToCatalog);
-  free (ImageToMeasure);
-  free (N_onImage);
-  free (N_ONIMAGE);
+    FREE (ImageToCatalog[i]); 
+    FREE (ImageToMeasure[i]); 
+    if (catlist) { FREE (catlist[i]); }
+  }
+  FREE (Ncatlist);
+  FREE (NCATLIST);
+  FREE (catlist);
+  Ncatlist = NULL;
+  NCATLIST = NULL;
+  catlist  = NULL;
+
+  FREE (ImageToCatalog);
+  FREE (ImageToMeasure);
+  FREE (N_onImage);
+  FREE (N_ONIMAGE);
 }
 
@@ -240,6 +263,9 @@
       name = GetPhotcodeNamebyCode (image[i].photcode);
       int showExample = (Nfew < 30);
-      if (showExample) fprintf (stderr, "image "OFF_T_FMT" (%d, %s) has "OFF_T_FMT" of %d measures (%s, %s) ",  i,  image[i].imageID, image[i].name, N_onImage[i], image[i].nstar,
-	       ohana_sec_to_date(image[i].tzero), name);
+      if (showExample) {
+	char *myDate = ohana_sec_to_date(image[i].tzero);
+	fprintf (stderr, "image "OFF_T_FMT" (%d, %s) has "OFF_T_FMT" of %d measures (%s, %s) ",  i,  image[i].imageID, image[i].name, N_onImage[i], image[i].nstar, myDate, name);
+	free (myDate);
+      }
       if (N_onImage[i] < 20) {
 	if (showExample) fprintf (stderr, "*");
@@ -508,4 +534,5 @@
     m = ImageToMeasure[im][i];
     c = ImageToCatalog[im][i];
+    myAssert (c < Ncatalog, "oops");
 
     Measure *measure = &catalog[c].measure[m];
@@ -653,4 +680,5 @@
     m = ImageToMeasure[im][i];
     c = ImageToCatalog[im][i];
+    myAssert (c < Ncatalog, "oops");
 
     MeasureTiny *measure = &catalog[c].measureT[m];
@@ -753,4 +781,5 @@
     m = ImageToMeasure[im][i];
     c = ImageToCatalog[im][i];
+    myAssert (c < Ncatalog, "oops");
 
     MeasureTiny *measure = &catalog[c].measureT[m];
@@ -829,4 +858,5 @@
     m = ImageToMeasure[im][i];
     c = ImageToCatalog[im][i];
+    myAssert (c < Ncatalog, "oops");
 
     // XXX should I use the raw coords or just measure.X,Y -> R,D?
@@ -871,4 +901,5 @@
     m = ImageToMeasure[im][i];
     c = ImageToCatalog[im][i];
+    myAssert (c < Ncatalog, "oops");
 
     MeasureTiny *measure = &catalog[c].measureT[m];
@@ -900,4 +931,5 @@
 }
 
+# if (0) 
 /** lifted from relphot/StarOps.clean_measures */
 void FlagOutliers2D(Catalog *catalog);
@@ -1267,2 +1299,3 @@
   return TRUE;
 }
+# endif
Index: trunk/Ohana/src/relastro/src/ImageTable.c
===================================================================
--- trunk/Ohana/src/relastro/src/ImageTable.c	(revision 39455)
+++ trunk/Ohana/src/relastro/src/ImageTable.c	(revision 39457)
@@ -33,4 +33,10 @@
   }
 
+  // gfits_db_free (&db);
+  gfits_free_header (&db.header);
+  gfits_free_matrix (&db.matrix);
+  gfits_free_header (&db.theader);
+  free (db.filename);
+
   *nimage = Nimage;
   return image;
@@ -61,4 +67,6 @@
   dvo_image_unlock (&db);
 
+  gfits_db_free (&db);
+
   return TRUE;
 }
Index: trunk/Ohana/src/relastro/src/MeasFilterTest.c
===================================================================
--- trunk/Ohana/src/relastro/src/MeasFilterTest.c	(revision 39457)
+++ trunk/Ohana/src/relastro/src/MeasFilterTest.c	(revision 39457)
@@ -0,0 +1,369 @@
+# include "relastro.h"
+
+/** lifted from relphot/StarOps.clean_measures */
+void FlagOutliers2D(Catalog *catalog);
+
+// operates on Full values (not tiny)
+void FlagOutliers (Catalog *catalog) {
+
+  // XXX FlagOutliers is now just using FlagOutliers2D
+  FlagOutliers2D(catalog);
+  return;
+
+  int Ndel, Nave;
+  off_t i, j, k, m, N, Nmax, TOOFEW, Nsecfilt;
+  double Ns, theta, x, y;
+  double *R, *D, *dR, *dD;
+  StatType statsR, statsD;
+
+  Nsecfilt = GetPhotcodeNsecfilt();
+  assert(catalog[0].Nsecfilt == Nsecfilt);
+
+  if (VERBOSE2) fprintf (stderr, "marking poor measures\n");
+  Nmax = 0;
+  for (i = 0; i < catalog[0].Naverage; i++) {
+    Nmax = MAX (Nmax, catalog[0].average[i].Nmeasure);
+  }
+
+  ALLOCATE (R, double, Nmax);
+  ALLOCATE (D, double, Nmax);
+  ALLOCATE (dR, double, Nmax);
+  ALLOCATE (dD, double, Nmax);
+
+  /* it makes no sense to mark 3-sigma outliers with <5 measurements */
+  TOOFEW = MAX (5, SRC_MEAS_TOOFEW);
+
+  Ns = CLIP_THRESH;
+  Ndel = Nave = 0;
+      
+  /* loop over each object in the catalog */
+  for (j = 0; j < catalog[0].Naverage; j++) {
+    
+    // pointer to this set of measurements
+    m = catalog[0].average[j].measureOffset;
+    Measure *measure = &catalog[0].measure[m];
+
+    /* accumulate list of valid measurements */
+    N = 0;
+    for (k = 0; k < catalog[0].average[j].Nmeasure; k++) {
+      // skip measurements based on user selected criteria
+      if (!MeasFilterTest(&measure[k], FALSE)) continue;
+      R[N] = measure[k].R;
+      D[N] = measure[k].D;
+      dR[N] = GetAstromError (&measure[k], ERROR_MODE_RA);
+      dD[N] = GetAstromError (&measure[k], ERROR_MODE_DEC);
+      if (isnan(R[N]) || isnan(D[N])) continue;
+      N++;
+    }
+    if (N <= TOOFEW) continue;
+    
+    /* 3-sigma clip based on stats of inner 50% */
+    initstats ("MEAN");
+    liststats (R, dR, N, &statsR);
+    liststats (D, dD, N, &statsD);
+    
+    statsR.sigma = MAX (MIN_ERROR, statsR.sigma);
+    statsD.sigma = MAX (MIN_ERROR, statsD.sigma);
+    
+    /* compare per-object distance to this standard deviation, and flag outliers*/
+    N = 0;
+    for (k = 0; k < catalog[0].average[j].Nmeasure; k++) {
+      // reset flag on each invocation
+      measure[k].dbFlags &= ~ID_MEAS_POOR_ASTROM;
+
+      // skip measurements based on user selected criteria
+      if (!MeasFilterTest(&measure[k], FALSE)) continue;
+      
+      x = measure[k].R - statsR.median;
+      y = measure[k].D - statsD.median;
+      theta = atan2(y,x);
+      if ((x*x + y*y) > (SQR(statsR.sigma * Ns * cos(theta)) + 
+			 SQR(statsD.sigma * Ns * sin(theta)))) {   
+	measure[k].dbFlags |= ID_MEAS_POOR_ASTROM;
+	Ndel++;
+      }
+      N++;
+      Nave ++;
+    }
+
+    // examine results
+    // relastroVisualPlotOutliers(catalog, catalog[0].average[j].measureOffset, catalog[0].average[j].Nmeasure, statsR, statsD, Ns);
+  }
+  
+  if (VERBOSE) fprintf (stderr, "%d measures marked poor, %d total\n", Ndel, Nave);
+  free (R);
+  free (dR);
+  free (D);
+  free (dD); 
+}
+
+
+/** an alternative outlier rejection scheme */
+void FlagOutliers2D (Catalog *catalog) {
+
+  int Ndel, Nave;
+  off_t i, j, k, m, N, Nmax, TOOFEW, Nsecfilt;
+  double *index;
+  double Ns, theta, x, y;
+  double *R, *D, *dR, *dD, *d2;
+  StatType statsR, statsD;
+
+  // XXX we are not going to use this for now
+  return;
+
+  Nsecfilt = GetPhotcodeNsecfilt();
+  assert(catalog[0].Nsecfilt == Nsecfilt);
+
+  if (VERBOSE2) fprintf (stderr, "marking poor measures\n");
+  Nmax = 0;
+  for (i = 0; i < catalog[0].Naverage; i++) {
+    Nmax = MAX (Nmax, catalog[0].average[i].Nmeasure);
+  }
+
+  ALLOCATE (R, double, Nmax);
+  ALLOCATE (D, double, Nmax);
+  ALLOCATE (dR, double, Nmax);
+  ALLOCATE (dD, double, Nmax);
+  ALLOCATE (d2, double, Nmax);
+  ALLOCATE (index, double, Nmax);
+
+  /* it makes no sense to mark 3-sigma outliers with <5 measurements */
+  TOOFEW = MAX (5, SRC_MEAS_TOOFEW);
+
+  Ns = CLIP_THRESH;
+  Ndel = Nave = 0;
+      
+  /* loop over each object in the catalog */
+  for (j = 0; j < catalog[0].Naverage; j++) {
+    
+    // pointer to this set of measurements
+    m = catalog[0].average[j].measureOffset;
+    Measure *measure = &catalog[0].measure[m];
+
+    /* accumulate list of valid measurements */
+    N = 0;
+    for (k = 0; k < catalog[0].average[j].Nmeasure; k++) {
+
+      // reset flag on each invocation
+      measure[k].dbFlags &= ~ID_MEAS_POOR_ASTROM;
+      
+      // skip measurements based on user selected criteria
+      if (!MeasFilterTest(&measure[k], FALSE)) continue;
+      R[N] = measure[k].R;
+      D[N] = measure[k].D;
+      dR[N] = GetAstromError(&measure[k], ERROR_MODE_RA);
+      dD[N] = GetAstromError(&measure[k], ERROR_MODE_DEC);
+      if (isnan(R[N]) || isnan(D[N])) continue;
+      N++;
+    }
+    if (N <= TOOFEW) continue;
+    
+    /* calculate mean of all points*/
+    initstats ("MEAN");
+    liststats (R, dR, N, &statsR);
+    liststats (D, dD, N, &statsD);
+    statsR.sigma = MAX (MIN_ERROR, statsR.sigma);
+    statsD.sigma = MAX (MIN_ERROR, statsD.sigma);
+    
+    /* calculate deviations of all points*/
+    N = 0;
+    for (k = 0; k < catalog[0].average[j].Nmeasure; k++) {
+      // skip bad measurements
+      if (!MeasFilterTest(&measure[k], FALSE)) continue;  
+      x = measure[k].R - statsR.median;
+      y = measure[k].D - statsD.median;
+      theta = atan2(y,x);
+      d2[N] = (x*x + y*y) / (SQR(statsR.sigma * Ns * cos(theta)) + 
+			     SQR(statsD.sigma * Ns * sin(theta)));      
+      index[N] = k;
+      N++;
+    }
+    
+    // sort d2
+    dsortpair(d2, index, N);
+    N = (N/2 > (N-1)) ? N/2 : N-1;
+
+    // recalculate image center, sigma based on closest 50% of points
+    for (k = 0;  k < N; k++) {
+      off_t ind = (off_t) index[k];
+      R[k] = measure[ind].R;
+      D[k] = measure[ind].D;
+      dR[k] = GetAstromError(&measure[ind], ERROR_MODE_RA);
+      dD[k] = GetAstromError(&measure[ind], ERROR_MODE_DEC);
+    }
+    liststats (R, dR, N, &statsR);
+    liststats (D, dD, N, &statsD);
+    statsR.sigma = MAX (MIN_ERROR, statsR.sigma);
+    statsD.sigma = MAX (MIN_ERROR, statsD.sigma);
+    
+    // use these new statistics to flag outliers 
+    N = 0;
+    for (k = 0; k < catalog[0].average[j].Nmeasure; k++) {
+      //skip bad measurements
+      if (!MeasFilterTest(&measure[k], FALSE)) continue;  
+      x = measure[k].R - statsR.median;
+      y = measure[k].D - statsD.median;
+      theta = atan2(y,x);
+      d2[N] = (x*x + y*y) / (SQR(statsR.sigma * Ns * cos(theta)) + 
+			     SQR(statsD.sigma * Ns * sin(theta)));      
+      if ((d2[N]) > 1) {
+	measure[k].dbFlags |= ID_MEAS_POOR_ASTROM;
+	Ndel ++;
+      }
+      N++;
+      Nave++;
+    }  // done rejecting outliers
+
+    // examine results
+    // relastroVisualPlotOutliers(catalog, catalog[0].average[j].measureOffset, catalog[0].average[j].Nmeasure, statsR, statsD, Ns);
+    
+  } // done looping over objects
+  
+  if (VERBOSE) fprintf (stderr, "%d measures marked poor, %d total\n", Ndel, Nave);
+  free (R);
+  free (dR);
+  free (D);
+  free (dD); 
+  free (d2);
+  free (index);
+}
+
+/** Determine whether a measurement should be included in the analysis, based on supplied filter criteria */ 
+// we only optionally apply the sigma limit: for object averages, this should not be used
+int MeasFilterTestTiny(MeasureTiny *measure, int applySigmaLim) {
+  int found, k;
+  long mask;
+  PhotCode *code;
+  float mag;
+
+  if (!finite(measure[0].R) || !finite(measure[0].D)) return FALSE;
+  if (!finite(measure[0].M)) return FALSE; //XXX is this necessary for all relastro tasks?
+  if (!finite(measure[0].dM)) return FALSE; //XXX is this necessary for all relastro tasks?
+  
+  if ((MinBadQF > 0.0) && (isGPC1chip(measure[0].photcode) || isGPC1stack(measure[0].photcode))) {
+    if (!isfinite(measure[0].psfQF)) { return FALSE; };
+    if (measure[0].psfQF < MinBadQF) { return FALSE; };
+  }
+
+  /* select measurements by photcode, or equiv photcode, if specified */
+  if (NphotcodesKeep > 0) {
+    found = FALSE;
+    for (k = 0; (k < NphotcodesKeep) && !found; k++) {
+      if (photcodesKeep[k][0].code == measure[0].photcode) found = TRUE;
+      if (photcodesKeep[k][0].code == GetPhotcodeEquivCodebyCode(measure[0].photcode)) found = TRUE;
+    }
+    if (!found) return FALSE;
+  }
+  
+  if (NphotcodesSkip > 0) {
+    found = FALSE;
+    for (k = 0; (k < NphotcodesSkip) && !found; k++) {
+      if (photcodesSkip[k][0].code == measure[0].photcode) found = TRUE;
+      if (photcodesSkip[k][0].code == GetPhotcodeEquivCodebyCode(measure[0].photcode)) found = TRUE;
+    }
+    if (found) return FALSE;
+  }  
+  
+  /* select measurements by time */
+  if (TimeSelect) {
+    if (measure[0].t < TSTART) return FALSE;
+    if (measure[0].t > TSTOP) return FALSE;
+  }
+  
+  /* select measurements by quality */
+  if (PhotFlagSelect) {
+    if (PhotFlagBad) {
+      mask = PhotFlagBad;
+    } else {
+      code = GetPhotcodebyCode (measure[0].photcode);
+      if (!code) return FALSE;
+      mask = code[0].astromBadMask;
+    }
+    if (mask & measure[0].photFlags) return FALSE;
+  }
+
+  /* select measurements by measurement error */
+  // this is a bit convoluted: applySigmaLim is only TRUE when this function is
+  // called by bcatalog.  for UpdateObjects, it is FALSE
+  if (applySigmaLim && (SIGMA_LIM > 0) && (measure[0].dM > SIGMA_LIM)) {
+    return FALSE;
+  }
+  
+  /* select measurements by mag limit */
+  if (ImagSelect) {
+    mag = PhotInstTiny (measure, MAG_CLASS_PSF);
+    if (mag < ImagMin || mag > ImagMax) return FALSE;
+  }
+  
+  return TRUE;
+}
+
+# define SUPER_VERBOSE 0
+
+/** Determine whether a measurement should be included in the analysis, based on supplied filter criteria */ 
+// we only optionally apply the sigma limit: for object averages, this should not be used (should it?)
+int MeasFilterTest(Measure *measure, int applySigmaLim) {
+  int found, k;
+  long mask;
+  PhotCode *code;
+  float mag;
+
+  if (!finite(measure[0].R) || !finite(measure[0].D)) { if (SUPER_VERBOSE) fprintf (stderr, "filter 1\n"); return FALSE; };
+  if (!finite(measure[0].M)) { if (SUPER_VERBOSE) fprintf (stderr, "filter 2\n"); return FALSE; }; //XXX is this necessary for all relastro tasks?
+  if (!finite(measure[0].dM)) { if (SUPER_VERBOSE) fprintf (stderr, "filter 3\n"); return FALSE; }; //XXX is this necessary for all relastro tasks?
+  
+  /* select measurements by photcode, or equiv photcode, if specified */
+  if (NphotcodesKeep > 0) {
+    found = FALSE;
+    for (k = 0; (k < NphotcodesKeep) && !found; k++) {
+      if (photcodesKeep[k][0].code == measure[0].photcode) found = TRUE;
+      if (photcodesKeep[k][0].code == GetPhotcodeEquivCodebyCode(measure[0].photcode)) found = TRUE;
+    }
+    if (!found) { if (SUPER_VERBOSE) fprintf (stderr, "filter 4\n"); return FALSE; };
+  }
+  
+  if (NphotcodesSkip > 0) {
+    found = FALSE;
+    for (k = 0; (k < NphotcodesSkip) && !found; k++) {
+      if (photcodesSkip[k][0].code == measure[0].photcode) found = TRUE;
+      if (photcodesSkip[k][0].code == GetPhotcodeEquivCodebyCode(measure[0].photcode)) found = TRUE;
+    }
+    if (found) { if (SUPER_VERBOSE) fprintf (stderr, "filter 5\n"); return FALSE; };
+  }  
+  
+  if ((MinBadQF > 0.0) && isGPC1chip(measure[0].photcode)) {
+    if (!isfinite(measure[0].psfQF)) { if (SUPER_VERBOSE) fprintf (stderr, "filter 6\n"); return FALSE; };
+    if (measure[0].psfQF < MinBadQF) { if (SUPER_VERBOSE) fprintf (stderr, "filter 7\n"); return FALSE; };
+  }
+
+  /* select measurements by time */
+  if (TimeSelect) {
+    if (measure[0].t < TSTART) { if (SUPER_VERBOSE) fprintf (stderr, "filter 8\n"); return FALSE; };
+    if (measure[0].t > TSTOP) { if (SUPER_VERBOSE) fprintf (stderr, "filter 9\n"); return FALSE; };
+  }
+  
+  /* select measurements by quality */
+  if (PhotFlagSelect) {
+    if (PhotFlagBad) {
+      mask = PhotFlagBad;
+    } else {
+      code = GetPhotcodebyCode (measure[0].photcode);
+      if (!code) { if (SUPER_VERBOSE) fprintf (stderr, "filter 10\n"); return FALSE; };
+      mask = code[0].astromBadMask;
+    }
+    if (mask & measure[0].photFlags) { if (SUPER_VERBOSE) fprintf (stderr, "filter 11\n"); return FALSE; };
+  }
+
+  /* select measurements by measurement error */
+  if (applySigmaLim && (SIGMA_LIM > 0) && (measure[0].dM > SIGMA_LIM)) {
+    { if (SUPER_VERBOSE) fprintf (stderr, "filter 12\n"); return FALSE; };
+  }
+  
+  /* select measurements by mag limit */
+  if (ImagSelect) {
+    mag = PhotInst (measure, MAG_CLASS_PSF);
+    if (mag < ImagMin || mag > ImagMax) { if (SUPER_VERBOSE) fprintf (stderr, "filter 13\n"); return FALSE; };
+  }
+  
+  return TRUE;
+}
Index: trunk/Ohana/src/relastro/src/MosaicOps.c
===================================================================
--- trunk/Ohana/src/relastro/src/MosaicOps.c	(revision 39455)
+++ trunk/Ohana/src/relastro/src/MosaicOps.c	(revision 39457)
@@ -3,5 +3,5 @@
 // array of mosaic definition structures
 static off_t   Nmosaic;
-static Mosaic *mosaic;
+static Mosaic *mosaic = NULL;
 
 // list of all images associated with a mosaic
@@ -185,4 +185,21 @@
 }
 
+void freeMosaics () {
+
+  off_t i;
+
+  if (!mosaic) return;
+
+  for (i = 0; i < Nmosaic; i++) {
+    FREE (mosaic_own_images[i]);
+  }
+
+  FREE (mosaic);
+  FREE (Nmosaic_own_images);
+  FREE (Amosaic_own_images);
+  FREE (mosaic_own_images);
+  FREE (mosaic_for_images);
+}
+
 // return StarData values for detections in the specified image, converting coordinates from the
 // chip positions: X,Y -> L,M -> P,Q -> R,D
@@ -274,4 +291,5 @@
 // extend each host image table to include the mosaic 'images' needed by the host
 int select_mosaics_hostregion (RegionHostTable *regionHosts, Image *image, off_t Nimage) {
+  OHANA_UNUSED_PARAM(Nimage);
 
   int i;
@@ -324,6 +342,10 @@
     }
     
+    free (addMosaic);
+
     host->Nimage += Nadd;
   }
+  free (mosaicUsed);
+
   return TRUE;
 }
Index: trunk/Ohana/src/relastro/src/SetSignals.c
===================================================================
--- trunk/Ohana/src/relastro/src/SetSignals.c	(revision 39455)
+++ trunk/Ohana/src/relastro/src/SetSignals.c	(revision 39457)
@@ -54,4 +54,6 @@
 
 void my_memdump (char *message) {
+
+  return;
 
   fprintf (stderr, "%s\n", message);
Index: trunk/Ohana/src/relastro/src/StarMaps.c
===================================================================
--- trunk/Ohana/src/relastro/src/StarMaps.c	(revision 39455)
+++ trunk/Ohana/src/relastro/src/StarMaps.c	(revision 39457)
@@ -25,5 +25,5 @@
 } StarMap;
 
-static StarMap     *starmap;         
+static StarMap *starmap = NULL; 
 // static int         Nstarmap;  -- is it always == Nimages?
 
@@ -55,4 +55,19 @@
 }
 
+void freeStarMaps () {
+
+  off_t i, Nimages;
+
+  getimages(&Nimages, NULL);
+
+  for (i = 0; i < Nimages; i++) {
+    FREE (starmap[i].points);
+    FREE (starmap[i].stars);
+  }
+
+  FREE (starmap);
+  return;
+}
+
 int updateStarMaps(Catalog *catalog) {
 
Index: trunk/Ohana/src/relastro/src/UpdateChips.c
===================================================================
--- trunk/Ohana/src/relastro/src/UpdateChips.c	(revision 39455)
+++ trunk/Ohana/src/relastro/src/UpdateChips.c	(revision 39457)
@@ -152,4 +152,6 @@
       }
     } 
+
+    AstromOffsetMapFree (oldCoords.offsetMap);
 
     // Apply the modified coords back to the measure.R,D.  Note that raw.R,D, ref.L,M, etc
@@ -356,4 +358,6 @@
     } 
 
+    AstromOffsetMapFree (oldCoords.offsetMap);
+
     // apply the modified R,D back to the measures
     setImageRaw (threadinfo->catalog, threadinfo->Ncatalog, i, raw, Nraw, MODE_MOSAIC);
@@ -569,4 +573,5 @@
     AstromOffsetMapSetOrder (truMap, tmpMap->Nx, tmpMap->Ny, image);
     AstromOffsetMapCopyData (truMap, tmpMap);
+    AstromOffsetMapFree (tmpMap);
     return;
   }
@@ -579,4 +584,5 @@
     unlockUpdateChips ();
     AstromOffsetMapCopyData (image->coords.offsetMap, tmpMap);
+    AstromOffsetMapFree (tmpMap);
     return;
   }
Index: trunk/Ohana/src/relastro/src/UpdateMeasures.c
===================================================================
--- trunk/Ohana/src/relastro/src/UpdateMeasures.c	(revision 39455)
+++ trunk/Ohana/src/relastro/src/UpdateMeasures.c	(revision 39457)
@@ -71,5 +71,5 @@
 
       double dR = 3600.0*fabs(csdec*(oldR - R));
-      double dD = 3600.0*fabs(oldD - R);
+      double dD = 3600.0*fabs(oldD - D);
 
       // complain if the new location is far from the old location
Index: trunk/Ohana/src/relastro/src/UpdateObjectOffsets.c
===================================================================
--- trunk/Ohana/src/relastro/src/UpdateObjectOffsets.c	(revision 39455)
+++ trunk/Ohana/src/relastro/src/UpdateObjectOffsets.c	(revision 39457)
@@ -62,5 +62,5 @@
     // uses MeasureTiny values, but will also update Measure values when populated
     // if Galaxy Motion Model correction is active, do not apply at this last stage 
-    UpdateObjects (&catalog, 1, FALSE);
+    UpdateObjects (&catalog, 1, -1);
 
     free_tiny_values(&catalog);
@@ -218,5 +218,8 @@
     fprintf (stderr, "command: %s\n", command);
 
-    if (PARALLEL_MANUAL) continue;
+    if (PARALLEL_MANUAL) {
+      free (command);
+      continue;
+    }
 
     if (PARALLEL_SERIAL) {
@@ -236,4 +239,5 @@
       group->hosts[i][0].pid = pid; // save for future reference
     }
+    free (command);
   }
 
@@ -338,5 +342,8 @@
     fprintf (stderr, "command: %s\n", command);
 
-    if (PARALLEL_MANUAL) continue;
+    if (PARALLEL_MANUAL) {
+      free (command);
+      continue;
+    }
 
     if (PARALLEL_SERIAL) {
@@ -356,4 +363,5 @@
       table->hosts[i].pid = pid; // save for future reference
     }
+    free (command);
   }
 
@@ -366,4 +374,6 @@
   }
 
+  FreeHostTable (table);
+
   return TRUE;
 }      
Index: trunk/Ohana/src/relastro/src/UpdateObjects.c
===================================================================
--- trunk/Ohana/src/relastro/src/UpdateObjects.c	(revision 39455)
+++ trunk/Ohana/src/relastro/src/UpdateObjects.c	(revision 39457)
@@ -121,4 +121,5 @@
 // be called with just MeasureTiny set and Measure == NULL
 int UpdateObjects_Chips (Average *average, SecFilt *secfilt, MeasureTiny *measure, Measure *measureBig, int Nsecfilt, FitStats *fitStats, int cat, off_t measOff) {
+  OHANA_UNUSED_PARAM(Nsecfilt);
 
   int k;
@@ -257,6 +258,7 @@
     }
 
+    // if we have fitted (and accepted) a parallax model, get the best pm fit and chisq
+    // given the set of points (mask is respected)
     if (average[0].flags & ID_OBJ_USE_PAR) {
-      // get the best pm fit and chisq given the set of points (mask is respected)
       if (!FitPM_Basic (&fitPM, fitStats->fitdataPM, fitStats->points, fitStats->Npoints)) {
 	average[0].flags |= ID_OBJ_BAD_PM;
@@ -551,4 +553,5 @@
 // be called with just MeasureTiny set and Measure == NULL
 int UpdateObjects_Stack (Average *average, SecFilt *secfilt, MeasureTiny *measure, Measure *measureBig, int Nsecfilt, FitStats *fitStats) {
+  OHANA_UNUSED_PARAM(Nsecfilt);
 
   int status;
@@ -650,4 +653,5 @@
 
 int UpdateObjects_SelectMeasures (FitStats *fit, Average *average, SecFilt *secfilt, MeasureTiny *measure, Measure *measureBig, int isStack, int *stackEntry) {
+  OHANA_UNUSED_PARAM(secfilt);
 
   // I've already allocated fit->points (and fit->sample) with space for fit->NpointsAlloc entries
Index: trunk/Ohana/src/relastro/src/UpdateStacks.c
===================================================================
--- trunk/Ohana/src/relastro/src/UpdateStacks.c	(revision 39457)
+++ trunk/Ohana/src/relastro/src/UpdateStacks.c	(revision 39457)
@@ -0,0 +1,60 @@
+# include "relastro.h"
+
+// NOTE: we only measure the systematic floor of the astrometric scatter per stack, no change to the calibration
+int UpdateStacks (Catalog *catalog, int Ncatalog) {
+
+  off_t Nimage;
+  Image *image = getimages (&Nimage, NULL);
+
+  off_t Nskip = 0;
+  off_t Nmeas = 0;
+
+  // measure the scatter for each stack
+  for (off_t i = 0; i < Nimage; i++) {
+
+    /* skip all except stack images */
+    if (!isGPC1stack(image[i].photcode)) continue;
+
+    /* convert measure coordinates to raw entries */
+    off_t Nraw;
+    StarData *raw = getImageRaw (catalog, Ncatalog, i, &Nraw, MODE_SIMPLE);
+    if (!raw) {
+      Nskip ++;
+      continue;
+    }
+    if (Nraw <= IMFIT_TOO_FEW) {
+      Nskip ++;
+      free (raw);
+      continue;
+    }
+
+    /* convert average coordinates to ref entries */
+    off_t Nref;
+    StarData *ref = getImageRef (catalog, Ncatalog, i, &Nref, MODE_SIMPLE);
+    if (!ref) {
+      Nskip ++;
+      free (raw);
+      continue;
+    }
+
+    // note that Nraw & Nref must be equal: if not, we made a programming error in one of these two functions.
+    assert (Nraw == Nref);
+
+    int Nstat;
+    float dLsig, dMsig, dRsig;
+    GetScatterRawRef(&dLsig, &dMsig, &dRsig, &Nstat, raw, ref, Nraw, IMFIT_SYS_SIGMA_LIM);
+
+    // XXX: I need to convert dLsig, dMsig from degrees to pixels
+    dLsig *= 3600.0 / 0.25;
+    dMsig *= 3600.0 / 0.25;
+
+    image[i].dXpixSys = dLsig;
+    image[i].dYpixSys = dMsig;
+    image[i].nFitAstrom = Nstat;
+  }
+
+  fprintf (stderr, "UpdateStacks: %d measured, %d skipped\n", (int) Nmeas, (int) Nskip);
+  return (TRUE);
+}
+
+// XXX 2 hardwired hacks in this file: 1) photcode hardwired for GPC1 stacks, 2) platescale
Index: trunk/Ohana/src/relastro/src/args.c
===================================================================
--- trunk/Ohana/src/relastro/src/args.c	(revision 39455)
+++ trunk/Ohana/src/relastro/src/args.c	(revision 39457)
@@ -51,4 +51,12 @@
     remove_argument (N, &argc, argv);
     RELASTRO_OP = OP_UPDATE_OFFSETS;
+  }
+
+  // elements needed for parallel regions / parallel images
+  MANUAL_UNIQUER = NULL;
+  if ((N = get_argument (argc, argv, "-manual-uniquer"))) {
+    remove_argument (N, &argc, argv);
+    MANUAL_UNIQUER = strcreate (argv[N]);
+    remove_argument (N, &argc, argv);
   }
 
@@ -372,5 +380,4 @@
       snprintf (PHOTCODE_SKIP_LIST, Ntotal, "%s,%s", SuperCOSMOS_SKIP, RawSkip);
       free (RawSkip);
-      free (SuperCOSMOS_SKIP);
     } else {
       PHOTCODE_SKIP_LIST = RawSkip;
@@ -378,4 +385,5 @@
     remove_argument (N, &argc, argv);
   }
+  free (SuperCOSMOS_SKIP);
 
   VERBOSE = VERBOSE2 = FALSE;
@@ -562,4 +570,39 @@
   if (argc != 1) usage ();
   return TRUE;
+}
+
+void relastro_free (SkyTable *sky, SkyList *skylist) {
+  FREE (REGION_FILE);
+  FREE (IMAGE_TABLE);
+  FREE (LoopWeight2MASSstr);
+  FREE (LoopWeightTychostr);
+
+  FREE (PHOTCODE_SKIP_LIST);
+  FREE (PHOTCODE_KEEP_LIST);
+  FREE (PHOTCODE_RESET_LIST);
+  FREE (DCR_RED_COLOR_POS);
+  FREE (DCR_RED_COLOR_NEG);
+  FREE (DCR_BLUE_COLOR_POS);
+  FREE (DCR_BLUE_COLOR_NEG);
+
+  FREE (PHOTCODE_A_LIST);
+  FREE (PHOTCODE_B_LIST);
+  FREE (HIGH_SPEED_DIR);
+  FREE (BCATALOG);
+  FREE (HOSTDIR);
+
+  // these are set in initialize
+  FREE(photcodesKeep);
+  FREE(photcodesSkip);  
+  FREE(photcodesReset); 
+  FREE(photcodesGroupA);
+  FREE(photcodesGroupB);
+  
+  SkyTableFree (sky);
+  SkyListFree(skylist);
+  FreePhotcodeTable();
+  
+  ohana_memcheck (VERBOSE);
+  ohana_memdump (VERBOSE);
 }
 
@@ -922,5 +965,5 @@
 }
 
-void relastro_client_free () {
+void relastro_client_free (SkyTable *sky, SkyList *skylist) {
   FREE (PHOTCODE_SKIP_LIST);
   FREE (PHOTCODE_KEEP_LIST);
@@ -936,4 +979,18 @@
   FREE(BCATALOG);
   FREE (HOSTDIR);
+
+  // these are set in initialize
+  FREE(photcodesKeep);
+  FREE(photcodesSkip);  
+  FREE(photcodesReset); 
+  FREE(photcodesGroupA);
+  FREE(photcodesGroupB);
+  
+  SkyTableFree (sky);
+  SkyListFree(skylist);
+  FreePhotcodeTable();
+  
+  ohana_memcheck (VERBOSE);
+  ohana_memdump (VERBOSE);
 }
 
Index: trunk/Ohana/src/relastro/src/assign_images.c
===================================================================
--- trunk/Ohana/src/relastro/src/assign_images.c	(revision 39455)
+++ trunk/Ohana/src/relastro/src/assign_images.c	(revision 39457)
@@ -156,4 +156,5 @@
 
     // this is a bit memory expensive : I am making a complete copy of the image table here
+    // XXX is adding an image, can we just add a pointer?
     off_t Nsubset = host->Nimage;
     host->image[Nsubset] = image[j];
@@ -168,4 +169,6 @@
 
     // save the astrometry maps, where they exist
+    // here we are adding an AstromOffsetTable, but the data are only pointers
+    // we should NOT free this table with AstromOffsetTableFree()
     if (image[j].coords.offsetMap) {
       if (!host->astromTable) {
Index: trunk/Ohana/src/relastro/src/bcatalog.c
===================================================================
--- trunk/Ohana/src/relastro/src/bcatalog.c	(revision 39455)
+++ trunk/Ohana/src/relastro/src/bcatalog.c	(revision 39457)
@@ -184,4 +184,7 @@
       offset = catalog[0].average[i].measureOffset + j;
       
+      // we do not measure astrometry for the warps, so skip:
+      if (isGPC1warp(catalog[0].measure[offset].photcode)) continue;
+
       // filter objects based on user supplied criteria, including SIGMA_LIM
       if (!MeasFilterTest(&catalog[0].measure[offset], TRUE)) {
Index: trunk/Ohana/src/relastro/src/dvo_astrom_ops.c
===================================================================
--- trunk/Ohana/src/relastro/src/dvo_astrom_ops.c	(revision 39455)
+++ trunk/Ohana/src/relastro/src/dvo_astrom_ops.c	(revision 39457)
@@ -2,5 +2,9 @@
 /* the Measure carries the instantaneous mean position at the epoch t */ 
 
+// average & secfilt no longer used since R and D are now in measure
+
 double getMeanR (MeasureTiny *measure, Average *average, SecFilt *secfilt) {
+  OHANA_UNUSED_PARAM(average);
+  OHANA_UNUSED_PARAM(secfilt);
 
   double ra;
@@ -14,4 +18,6 @@
 
 double getMeanD (MeasureTiny *measure, Average *average, SecFilt *secfilt) {
+  OHANA_UNUSED_PARAM(average);
+  OHANA_UNUSED_PARAM(secfilt);
 
   double dec;
@@ -25,4 +31,6 @@
 
 int setMeanR (double ra_fit, MeasureTiny *measure, Average *average, SecFilt *secfilt) {
+  OHANA_UNUSED_PARAM(average);
+  OHANA_UNUSED_PARAM(secfilt);
 
   // old: measure[0].dR += (ra_fit - average[0].R) * 3600.0;
@@ -34,4 +42,6 @@
 
 int setMeanD (double dec_fit, MeasureTiny *measure, Average *average, SecFilt *secfilt) {
+  OHANA_UNUSED_PARAM(average);
+  OHANA_UNUSED_PARAM(secfilt);
 
   // old: measure[0].dD += (dec_fit - average[0].D) * 3600.0;
@@ -43,4 +53,6 @@
 
 double getMeanR_Big (Measure *measure, Average *average, SecFilt *secfilt) {
+  OHANA_UNUSED_PARAM(average);
+  OHANA_UNUSED_PARAM(secfilt);
 
   double ra;
@@ -54,4 +66,6 @@
 
 double getMeanD_Big (Measure *measure, Average *average, SecFilt *secfilt) {
+  OHANA_UNUSED_PARAM(average);
+  OHANA_UNUSED_PARAM(secfilt);
 
   double dec;
@@ -65,4 +79,6 @@
 
 int setMeanR_Big (double ra_fit, Measure *measure, Average *average, SecFilt *secfilt) {
+  OHANA_UNUSED_PARAM(average);
+  OHANA_UNUSED_PARAM(secfilt);
 
   // old: measure[0].dR += (ra_fit - average[0].R) * 3600.0;
@@ -74,4 +90,6 @@
 
 int setMeanD_Big (double dec_fit, Measure *measure, Average *average, SecFilt *secfilt) {
+  OHANA_UNUSED_PARAM(average);
+  OHANA_UNUSED_PARAM(secfilt);
 
   // measure[0].dD += (dec_fit - average[0].D) * 3600.0;
Index: trunk/Ohana/src/relastro/src/fitobj.c
===================================================================
--- trunk/Ohana/src/relastro/src/fitobj.c	(revision 39455)
+++ trunk/Ohana/src/relastro/src/fitobj.c	(revision 39457)
@@ -156,4 +156,5 @@
 
 Catalog *mkstar (FitStats *fitStats, double Ro, double Do, double uR, double uD, double plx, int Npoints, int Nbad) {
+  OHANA_UNUSED_PARAM(fitStats);
   
   int i;
@@ -239,2 +240,17 @@
   return catalog;
 }
+
+// these dummy functions are used to avoid including ImageOps, etc
+int areImagesMatched () {
+  return FALSE;
+}
+float getColorBlue (off_t meas, int cat) {
+  OHANA_UNUSED_PARAM(meas);
+  OHANA_UNUSED_PARAM(cat);
+  return (NAN);
+}
+float getColorRed (off_t meas, int cat) {
+  OHANA_UNUSED_PARAM(meas);
+  OHANA_UNUSED_PARAM(cat);
+  return (NAN);
+}
Index: trunk/Ohana/src/relastro/src/fitobj2.c
===================================================================
--- trunk/Ohana/src/relastro/src/fitobj2.c	(revision 39455)
+++ trunk/Ohana/src/relastro/src/fitobj2.c	(revision 39457)
@@ -173,4 +173,5 @@
 
 Catalog *mkstar (FitStats *fitStats, double Ro, double Do, double uR, double uD, double plx, int Npoints, int Nbad) {
+  OHANA_UNUSED_PARAM(fitStats);
   
   int i;
@@ -264,2 +265,17 @@
   return catalog;
 }
+
+// these dummy functions are used to avoid including ImageOps, etc
+int areImagesMatched () {
+  return FALSE;
+}
+float getColorBlue (off_t meas, int cat) {
+  OHANA_UNUSED_PARAM(meas);
+  OHANA_UNUSED_PARAM(cat);
+  return (NAN);
+}
+float getColorRed (off_t meas, int cat) {
+  OHANA_UNUSED_PARAM(meas);
+  OHANA_UNUSED_PARAM(cat);
+  return (NAN);
+}
Index: trunk/Ohana/src/relastro/src/fitstk.c
===================================================================
--- trunk/Ohana/src/relastro/src/fitstk.c	(revision 39455)
+++ trunk/Ohana/src/relastro/src/fitstk.c	(revision 39457)
@@ -279,2 +279,17 @@
   return catalog;
 }
+
+// these dummy functions are used to avoid including ImageOps, etc
+int areImagesMatched () {
+  return FALSE;
+}
+float getColorBlue (off_t meas, int cat) {
+  OHANA_UNUSED_PARAM(meas);
+  OHANA_UNUSED_PARAM(cat);
+  return (NAN);
+}
+float getColorRed (off_t meas, int cat) {
+  OHANA_UNUSED_PARAM(meas);
+  OHANA_UNUSED_PARAM(cat);
+  return (NAN);
+}
Index: trunk/Ohana/src/relastro/src/high_speed_utils.c
===================================================================
--- trunk/Ohana/src/relastro/src/high_speed_utils.c	(revision 39455)
+++ trunk/Ohana/src/relastro/src/high_speed_utils.c	(revision 39457)
@@ -8,6 +8,4 @@
 #define DEFAULT_WHERE_B  "((flags & 0x01000000) == 0) && ((flags & 0x04000000) && ((y:nphot > 1) || (z:nphot > 1)) &&((y:err < 0.2) || (z:err < 0.2)))"
 
-
-extern char **isolate_elements(int, char **, int *);
 
 int print_error();
@@ -76,5 +74,5 @@
     // parse it into elements of the where condition
     char **cstack = NULL;
-    int Ncstack;
+    unsigned int Ncstack;
     cstack = isolate_elements(nWords, words, &Ncstack);
     free(words);
Index: trunk/Ohana/src/relastro/src/indexCatalogs.c
===================================================================
--- trunk/Ohana/src/relastro/src/indexCatalogs.c	(revision 39455)
+++ trunk/Ohana/src/relastro/src/indexCatalogs.c	(revision 39457)
@@ -1,8 +1,8 @@
 # include "relastro.h"
 
-static int   catIDmax = 0;
-static int  *catIDseq = NULL;
-static int  *objIDmax = NULL;
-static int **objIDseq = NULL;
+static unsigned int   catIDmax = 0;
+static          int  *catIDseq = NULL;
+static unsigned int  *objIDmax = NULL;
+static          int **objIDseq = NULL;
 
 int indexCatalogs (Catalog *catalog, int Ncatalog) {
@@ -19,15 +19,17 @@
 
   ALLOCATE (catIDseq, int, catIDmax + 1);
-  for (i = 0; i < catIDmax + 1; i++) {
-    catIDseq[i] = -1;
+
+  unsigned int ID;
+  for (ID = 0; ID < catIDmax + 1; ID++) {
+    catIDseq[ID] = -1;
   }
 
   for (i = 0; i < Ncatalog; i++) {
-    int catID = catalog[i].catID;
+    unsigned int catID = catalog[i].catID;
     catIDseq[catID] = i;
   }
   
-  ALLOCATE (objIDmax, int,   Ncatalog);
-  ALLOCATE (objIDseq, int *, Ncatalog);
+  ALLOCATE (objIDmax, unsigned int,   Ncatalog);
+  ALLOCATE (objIDseq,          int *, Ncatalog);
   for (i = 0; i < Ncatalog; i++) {
     objIDmax[i] = 0;
@@ -37,10 +39,10 @@
 
     ALLOCATE (objIDseq[i], int, objIDmax[i] + 1);
-    for (j = 0; j < objIDmax[i] + 1; j++) {
-      objIDseq[i][j] = -1;
+    for (ID = 0; ID < objIDmax[i] + 1; ID++) {
+      objIDseq[i][ID] = -1;
     }
 
     for (j = 0; j < catalog[i].Naverage; j++) {
-      int objID = catalog[i].average[j].objID;
+      unsigned int objID = catalog[i].average[j].objID;
       objIDseq[i][objID] = j;
     }
@@ -49,5 +51,16 @@
 }
 
-int catID_and_objID_to_seq (int catID, int objID, int *catSeq, off_t *objSeq) {
+void freeCatalogIndexes (int Ncatalog) {
+  int i;
+
+  for (i = 0; i < Ncatalog; i++) {
+    free (objIDseq[i]);
+  }
+  free (objIDmax);
+  free (objIDseq);
+  free (catIDseq);
+}
+
+int catID_and_objID_to_seq (unsigned int catID, unsigned int objID, int *catSeq, off_t *objSeq) {
 
   if (catID > catIDmax) return FALSE;
Index: trunk/Ohana/src/relastro/src/initialize.c
===================================================================
--- trunk/Ohana/src/relastro/src/initialize.c	(revision 39455)
+++ trunk/Ohana/src/relastro/src/initialize.c	(revision 39457)
@@ -2,4 +2,10 @@
 
 void initialize (int argc, char **argv) {
+
+  photcodesKeep   = NULL; 
+  photcodesSkip   = NULL; 
+  photcodesReset  = NULL; 
+  photcodesGroupA = NULL; 
+  photcodesGroupB = NULL; 
 
   ConfigInit (&argc, argv);
Index: trunk/Ohana/src/relastro/src/launch_region_hosts.c
===================================================================
--- trunk/Ohana/src/relastro/src/launch_region_hosts.c	(revision 39455)
+++ trunk/Ohana/src/relastro/src/launch_region_hosts.c	(revision 39457)
@@ -161,5 +161,8 @@
     fprintf (stderr, "command: %s\n", command);
     
-    if (PARALLEL_REGIONS_MANUAL) continue;
+    if (PARALLEL_REGIONS_MANUAL) { 
+      free (command);
+      continue;
+    }
 
     // launch the job, then wait for it to be done loading catalogs.  force the remote
@@ -180,4 +183,6 @@
     check_sync_file (syncfile, 1);
     free (syncfile);
+
+    free (command);
   }
 
Index: trunk/Ohana/src/relastro/src/load_catalogs.c
===================================================================
--- trunk/Ohana/src/relastro/src/load_catalogs.c	(revision 39455)
+++ trunk/Ohana/src/relastro/src/load_catalogs.c	(revision 39457)
@@ -142,5 +142,10 @@
   int TIME = time(NULL);
   int PID = getpid();
-  snprintf (uniquer, 12, "%05d.%05d", PID, TIME % 100000);
+
+  if (PARALLEL_MANUAL && MANUAL_UNIQUER) {
+    snprintf (uniquer, 12, "%11s", MANUAL_UNIQUER);
+  } else {
+    snprintf (uniquer, 12, "%05d.%05d", PID, TIME % 100000);
+  }
 
   // load the list of hosts
@@ -224,5 +229,8 @@
     fprintf (stderr, "command: %s\n", command);
 
-    if (PARALLEL_MANUAL) continue;
+    if (PARALLEL_MANUAL) {
+      free (command);
+      continue;
+    }
 
     if (PARALLEL_SERIAL) {
@@ -242,4 +250,5 @@
       table->hosts[i].pid = pid; // save for future reference
     }
+    free (command);
   }
 
@@ -289,6 +298,15 @@
   }
 
+  FreeHostTable (table);
+
   Catalog *catalog = catalogs->catalog;
   *Ncatalog = catalogs->Ncatalog;
+
+  // need to free the place-holder catalogs:
+  for (i = catalogs->Ncatalog; i < catalogs->NCATALOG; i++) {
+    free (catalogs->catalog[i].average);
+    free (catalogs->catalog[i].measureT);
+    free (catalogs->catalog[i].secfilt);
+  }
 
   int Nmeasure = 0;
Index: trunk/Ohana/src/relastro/src/load_images.c
===================================================================
--- trunk/Ohana/src/relastro/src/load_images.c	(revision 39455)
+++ trunk/Ohana/src/relastro/src/load_images.c	(revision 39457)
@@ -27,15 +27,4 @@
   MARKTIME("build chip match: %f sec\n", dtime);
 
-  char mapfile[DVO_MAX_PATH];
-  snprintf (mapfile, DVO_MAX_PATH, "%s/AstroMap.fits", CATDIR);
-  table = AstromOffsetMapLoad (mapfile, 100000, VERBOSE);
-
-  // assign images.coords.offsetMap -> table->map[i]
-  if (table) {
-    AstromOffsetTableMatchChips (image, Nimage, table);
-  } else {
-    table = AstromOffsetTableInit ();
-  }
-
   // select the images which overlap the selected sky regions
   if (UseAllImages) {
@@ -54,4 +43,27 @@
   }
     
+  /* unlock, if we can (else, unlocked below) and free, if we can */
+  int unlockImages = !UPDATE || (RELASTRO_OP == OP_UPDATE_OFFSETS);
+  if (unlockImages) { 
+    if (subset != image) {
+      // if we have generated an image subset and we are running UPDATE_OFFSETS, the we can free images here
+      free (image);
+      db[0].ftable.buffer = NULL;
+      BuildChipMatch (subset, Nsubset);
+    }
+    dvo_image_unlock (db); 
+  }
+
+  char mapfile[DVO_MAX_PATH];
+  snprintf (mapfile, DVO_MAX_PATH, "%s/AstroMap.fits", CATDIR);
+  table = AstromOffsetMapLoad (mapfile, 100000, VERBOSE);
+
+  // assign images.coords.offsetMap -> table->map[i]
+  if (table) {
+    AstromOffsetTableMatchChips (subset, Nsubset, table);
+  } else {
+    table = AstromOffsetTableInit ();
+  }
+
   initImages (subset, LineNumber, Nsubset);
   MARKTIME("  init images: %f sec\n", dtime);
@@ -60,8 +72,4 @@
   MARKTIME("  init mosaics: %f sec\n", dtime);
   
-  /* unlock, if we can (else, unlocked below) */
-  int unlockImages = !UPDATE || (RELASTRO_OP == OP_UPDATE_OFFSETS);
-  if (unlockImages) dvo_image_unlock (db); 
-
   return TRUE;
 }
@@ -102,2 +110,7 @@
 }
 
+void free_astrom_table () {
+  if (!table) return;
+  AstromOffsetTableFree (table);
+  free (table);
+}
Index: trunk/Ohana/src/relastro/src/plot_scatter.c
===================================================================
--- trunk/Ohana/src/relastro/src/plot_scatter.c	(revision 39455)
+++ trunk/Ohana/src/relastro/src/plot_scatter.c	(revision 39457)
@@ -2,4 +2,6 @@
    
 void plot_scatter (Catalog *catalog, int Ncatalog) {
+  OHANA_UNUSED_PARAM(catalog);
+  OHANA_UNUSED_PARAM(Ncatalog);
 
 # if (0)   
Index: trunk/Ohana/src/relastro/src/plotstuff.c
===================================================================
--- trunk/Ohana/src/relastro/src/plotstuff.c	(revision 39455)
+++ trunk/Ohana/src/relastro/src/plotstuff.c	(revision 39457)
@@ -44,4 +44,5 @@
 
 void JpegPlot (Graphdata *graphmode, int N, char *filename) {
+  OHANA_UNUSED_PARAM(graphmode);
 
   if (Xgraph[N] == 0) return;
@@ -52,4 +53,5 @@
 
 void PSPlot (Graphdata *graphmode, int N, char *filename) {
+  OHANA_UNUSED_PARAM(graphmode);
 
   if (Xgraph[N] == 0) return;
@@ -79,4 +81,5 @@
 
 void PlotVector (int Npts, double *vect, int mode, int N, char *type) {
+  OHANA_UNUSED_PARAM(mode);
 
   float *values;
Index: trunk/Ohana/src/relastro/src/relastro.c
===================================================================
--- trunk/Ohana/src/relastro/src/relastro.c	(revision 39455)
+++ trunk/Ohana/src/relastro/src/relastro.c	(revision 39457)
@@ -7,7 +7,12 @@
   initialize (argc, argv);
 
-  SkyTable *sky = SkyTableLoadOptimal (CATDIR, SKY_TABLE, GSCFILE, TRUE, SKY_DEPTH, VERBOSE);
-  SkyTableSetFilenames (sky, CATDIR, "cpt");
-  SkyList *skylist = SkyListByPatch (sky, -1, &UserPatch);
+  SkyTable *sky = NULL;
+  SkyList *skylist = NULL;
+
+  if ((RELASTRO_OP != OP_PARALLEL_IMAGES) && (RELASTRO_OP != OP_PARALLEL_REGIONS)) {
+    sky = SkyTableLoadOptimal (CATDIR, SKY_TABLE, GSCFILE, TRUE, SKY_DEPTH, VERBOSE);
+    SkyTableSetFilenames (sky, CATDIR, "cpt");
+    skylist = SkyListByPatch (sky, -1, &UserPatch);
+  }
 
   switch (RELASTRO_OP) {
@@ -15,27 +20,15 @@
       /* the object analysis is a separate process iterating over catalogs */
       relastro_objects (skylist, 0, NULL);
-      exit (0);
-
-    case OP_HIGH_SPEED:
-      /* high-speed is a 2pt cross-correlation process for linking moving objects (high PM) */
-      high_speed_catalogs (sky, skylist, 0, NULL);
-      exit (0);
-
-    case OP_HPM:
-      hpm_catalogs (sky, skylist, 0, NULL);
-      exit (0);
-
-    case OP_MERGE_SOURCE:
-      /* a special method to manually merge unlinked detections of sources togther (not parallel) */
-      relastro_merge_source (sky);
+      relastro_free (sky, skylist);
       exit (0);
 
     case OP_IMAGES:
       relastro_images (skylist);
+      relastro_free (sky, skylist);
       exit (0);
 
-    case OP_UPDATE_OFFSETS: 
+    case OP_UPDATE_OFFSETS: {
+      FITS_DB db;
       if (!PARALLEL) {
-	FITS_DB db;
       
 	set_db (&db);
@@ -55,5 +48,14 @@
       // iterate over catalogs to make detection coordinates consistant
       UpdateObjectOffsets (skylist, 0, NULL);
+
+      if (!PARALLEL) {
+	gfits_db_free (&db);
+	freeImages();
+	freeMosaics ();
+      }	
+
+      relastro_free (sky, skylist);
       exit (0);
+    }
 
     case OP_PARALLEL_REGIONS:
@@ -67,4 +69,18 @@
       exit (0);
 
+    case OP_HIGH_SPEED:
+      /* high-speed is a 2pt cross-correlation process for linking moving objects (high PM) */
+      high_speed_catalogs (sky, skylist, 0, NULL);
+      exit (0);
+
+    case OP_HPM:
+      hpm_catalogs (sky, skylist, 0, NULL);
+      exit (0);
+
+    case OP_MERGE_SOURCE:
+      /* a special method to manually merge unlinked detections of sources togther (not parallel) */
+      relastro_merge_source (sky);
+      exit (0);
+
     default:
       fprintf (stderr, "impossible!\n");
Index: trunk/Ohana/src/relastro/src/relastro_client.c
===================================================================
--- trunk/Ohana/src/relastro/src/relastro_client.c	(revision 39455)
+++ trunk/Ohana/src/relastro/src/relastro_client.c	(revision 39457)
@@ -55,8 +55,4 @@
       }
 
-      SkyTableFree (sky);
-      SkyListFree(skylist);
-      FreePhotcodeTable();
-
       int i;
       for (i = 0; i < Ncatalog; i++) {
@@ -66,13 +62,5 @@
       BrightCatalogFree(bcatalog);
 
-      relastro_client_free ();
-      FREE(photcodesKeep);
-      FREE(photcodesSkip);  
-      FREE(photcodesReset); 
-      FREE(photcodesGroupA);
-      FREE(photcodesGroupB);
-
-      ohana_memcheck (TRUE);
-      ohana_memdump (TRUE);
+      relastro_client_free (sky, skylist);
       break;
     }
@@ -81,16 +69,5 @@
       // USAGE: relastro_client -update-objects
       relastro_objects (skylist, HOST_ID, HOSTDIR);
-      break;
-    }
-
-    case OP_HIGH_SPEED: {
-      // USAGE: relastro_client -high-speed
-      high_speed_catalogs (sky, skylist, HOST_ID, HOSTDIR);
-      break;
-    }
-
-    case OP_HPM: {
-      // USAGE: relastro_client -high-speed
-      hpm_catalogs (sky, skylist, HOST_ID, HOSTDIR);
+      relastro_client_free (sky, skylist);
       break;
     }
@@ -112,25 +89,24 @@
       /* load regions and images based on specified sky patch (default depth) */
       load_images (&db, skylist, FALSE, USE_ALL_IMAGES);
-      
-      // I can free the database after I have loaded the images...
-
-      // // load the image subset table from the specified location
-      // off_t Nimage;
-      // ImageSubset *image = ImageSubsetLoad (IMAGES, &Nimage);
-      // if (!image) {
-      // 	  fprintf (stderr, "ERROR loading image subset %s\n", CATDIR);
-      // 	  exit (2);
-      // }
-      // 
-      // // save the available image information in the static array in ImageOps.c
-      // initImagesSubset (image, NULL, Nimage);
-      // 
-      // // load the flat-field correction table from CATDIR
-      // char flatcorrFile[1024];
-      // snprintf (flatcorrFile, 1024, "%s/flatcorr.fits", CATDIR);
-      // FlatCorrectionTable *flatcorr = FlatCorrectionLoad (flatcorrFile, VERBOSE);
 
       UpdateObjectOffsets (skylist, HOST_ID, HOSTDIR);
       
+      gfits_db_free (&db);
+      freeImages();
+      freeMosaics ();
+
+      relastro_client_free (sky, skylist);
+      break;
+    }
+
+    case OP_HIGH_SPEED: {
+      // USAGE: relastro_client -high-speed
+      high_speed_catalogs (sky, skylist, HOST_ID, HOSTDIR);
+      break;
+    }
+
+    case OP_HPM: {
+      // USAGE: relastro_client -high-speed
+      hpm_catalogs (sky, skylist, HOST_ID, HOSTDIR);
       break;
     }
Index: trunk/Ohana/src/relastro/src/relastro_images.c
===================================================================
--- trunk/Ohana/src/relastro/src/relastro_images.c	(revision 39455)
+++ trunk/Ohana/src/relastro/src/relastro_images.c	(revision 39457)
@@ -12,4 +12,8 @@
   set_db (&db);
   gfits_db_init (&db);
+
+  // final pass fit mode (use FIT_AVERAGE only for the image loop)
+  int finalPassMode = FIT_MODE; // start with the globally-defined fit mode
+  FIT_MODE = FIT_AVERAGE;
 
   /* lock and load the image db table */
@@ -77,4 +81,9 @@
 	MARKTIME("update chips: %f sec\n", dtime);
       }
+
+      // measure scatter for stacks
+      UpdateStacks (catalog, Ncatalog);
+      MARKTIME("UpdateStacks: %f sec\n", dtime);
+
       // create summary plots of the process
       // relastroVisualSummaryChips();
@@ -93,8 +102,19 @@
   }
 
-  if (!UPDATE) exit (0);
+  if (!UPDATE) { 
+    freeStarMaps();
+    gfits_db_free (&db);
+    ohana_memcheck (VERBOSE);
+    ohana_memdump (VERBOSE);
+    exit (0);
+  }
 
   // free the image / measurement pointers
-  freeImageBins (1);
+  freeImageBins (Ncatalog);
+  for (i = 0; i < Ncatalog; i++) {
+    dvo_catalog_free (&catalog[i]);
+  }
+  free (catalog);
+  freeMosaics ();
 
   // If we did NOT use all images, then we applied the measured corrections to a subset of
@@ -105,4 +125,5 @@
     reload_images (&db);
   }
+  freeStarMaps();
     
   if (PARALLEL) {
@@ -116,4 +137,6 @@
     }
     dvo_image_unlock (&db); 
+    gfits_db_free (&db);
+    freeImages();
   }
 
@@ -123,7 +146,9 @@
 
   // if we do NOT have parallel partitions, we must NOT write them out yet: the act of
-  // writing out the files byte-swaps the data and makes the values invalide for the
+  // writing out the files byte-swaps the data and makes the values invalid for the
   // following calls to UpdateObjectOffsets (which attempt to apply the image values from
   // the structure in memory)
+
+  FIT_MODE = finalPassMode; // use the user-selected mode for the final pass
 
   // iterate over catalogs to make detection coordinates consistant
@@ -141,6 +166,8 @@
     }
     dvo_image_unlock (&db); 
+    gfits_db_free (&db);
+    freeImages();
   }
 
-  exit (0);
+  return TRUE;
 }
Index: trunk/Ohana/src/relastro/src/relastro_merge_source.c
===================================================================
--- trunk/Ohana/src/relastro/src/relastro_merge_source.c	(revision 39455)
+++ trunk/Ohana/src/relastro/src/relastro_merge_source.c	(revision 39457)
@@ -22,10 +22,11 @@
   // load data from each region file, only use bright stars
   for (i = 0; i < sky[0].Nregions; i++) {
-    if (sky[0].regions[i].index == CAT_ID_SRC) {
+    myAssert (sky[0].regions[i].index >= 0, "oops");
+    if ((unsigned int) sky[0].regions[i].index == CAT_ID_SRC) {
       catalog_src.filename = sky[0].filename[i];
       region_src = &sky[0].regions[i];
     }
     // currently, we only accept dst == src...
-    if (sky[0].regions[i].index == CAT_ID_DST) {
+    if ((unsigned int) sky[0].regions[i].index == CAT_ID_DST) {
       catalog_dst.filename = sky[0].filename[i];
       // region_dst = &sky[0].regions[i];
Index: trunk/Ohana/src/relastro/src/relastro_objects.c
===================================================================
--- trunk/Ohana/src/relastro/src/relastro_objects.c	(revision 39455)
+++ trunk/Ohana/src/relastro/src/relastro_objects.c	(revision 39457)
@@ -84,5 +84,7 @@
     populate_tiny_values(&catalog, DVO_TV_MEASURE);
 
-    UpdateObjects (&catalog, 1, 0);
+    // the 3rd argument (-1) is the loop number for re-weighting 2MASS and Tycho. -1 is a special value meaning "ignore" 
+    // we do NOT want to apply special weights to 2MASS and/or Tycho when calculating object final motions.
+    UpdateObjects (&catalog, 1, -1); 
 
     free_tiny_values(&catalog);
@@ -215,4 +217,5 @@
       table->hosts[i].pid = pid; // save for future reference
     }
+    free (command);
   }
 
@@ -224,4 +227,5 @@
     HostTableWaitJobsGetIO (table, __FILE__, __LINE__, VERBOSE);
   }
+  FreeHostTable (table);
 
   return TRUE;
Index: trunk/Ohana/src/relastro/src/relastro_parallel_images.c
===================================================================
--- trunk/Ohana/src/relastro/src/relastro_parallel_images.c	(revision 39455)
+++ trunk/Ohana/src/relastro/src/relastro_parallel_images.c	(revision 39457)
@@ -16,4 +16,8 @@
 
   INITTIME;
+
+  // over-ride user selection here: this program does not set the final object 
+  // astrometry.  since it only sets the image parameters it should not use pm or par
+  FIT_MODE = FIT_AVERAGE;
 
   client_logger_init (CATDIR);
@@ -141,4 +145,9 @@
 	LOGRTIME("slurp_meas_pos loop %d on %s, host %d: %f sec\n", i, myHostName, REGION_HOST_ID, dtime);
       }
+
+      // measure scatter for stacks
+      UpdateStacks (catalog, Ncatalog);
+      LOGRTIME("UpdateStacks on %s, host %d: %f sec\n", myHostName, REGION_HOST_ID, dtime);
+
       // create summary plots of the process
       // relastroVisualSummaryChips();
@@ -176,4 +185,22 @@
   LOGRTIME("share image pos loop %d on %s, host %d: %f sec\n", -1, myHostName, REGION_HOST_ID, dtime);
 
+  // free the image / measurement pointers
+  freeImageBins (Ncatalog);
+  for (i = 0; i < Ncatalog; i++) {
+    dvo_catalog_free (&catalog[i]);
+  }
+  free (catalog);
+  freeCatalogIndexes(Ncatalog);
+
+  freeMosaics ();
+
+  freeStarMaps();
+
+  freeImages();
+  free (image);
+
+  FreeRegionHostTable (regionHosts);
+  relastro_free (sky, skylist);
+
   exit (0);
 }
Index: trunk/Ohana/src/relastro/src/relastro_parallel_regions.c
===================================================================
--- trunk/Ohana/src/relastro/src/relastro_parallel_regions.c	(revision 39455)
+++ trunk/Ohana/src/relastro/src/relastro_parallel_regions.c	(revision 39457)
@@ -83,5 +83,14 @@
   }
 
+// testjump:
+
   MARKTIME ("finished relastro -parallel-regions: %f sec total\n", dtime);
+  
+  gfits_db_free (&db);
+  freeImages();
+  freeMosaics ();
+
+  FreeRegionHostTable (regionHosts);
+  relastro_free (sky, skylist);
 
   exit (0);
Index: trunk/Ohana/src/relastro/src/share_icrf_obj.c
===================================================================
--- trunk/Ohana/src/relastro/src/share_icrf_obj.c	(revision 39455)
+++ trunk/Ohana/src/relastro/src/share_icrf_obj.c	(revision 39457)
@@ -99,4 +99,5 @@
     int cat, ave, meas;
     ICRFdata (i, &cat, &ave, &meas);
+    myAssert (cat < Ncatalog, "oops");
 
     Average *average = &catalog[cat].average[ave];
Index: trunk/Ohana/src/relastro/src/share_images_pos.c
===================================================================
--- trunk/Ohana/src/relastro/src/share_images_pos.c	(revision 39455)
+++ trunk/Ohana/src/relastro/src/share_images_pos.c	(revision 39457)
@@ -141,8 +141,12 @@
 
     AstromOffsetTableFree(table);
+    free (table);
     LOGRTIME("image_maps_free host %d loop %d on %s, host %d: %f sec\n", i, nloop, myHostName, REGION_HOST_ID, dtime);
   }
 
   // apply the modified image parameters to my detections
+  // This loop is skipped because the updated image parameters are applied to 
+  // all measurements in UpdateChips (and those modified measurements are saved 
+  // at the same time)
   for (i = 0; FALSE && (Ncatalog > 0) && (i < Nimage_pos); i++) {
     off_t seq = getImageByID (image_pos[i].imageID);
Index: trunk/Ohana/src/relastro/src/share_mean_pos.c
===================================================================
--- trunk/Ohana/src/relastro/src/share_mean_pos.c	(revision 39455)
+++ trunk/Ohana/src/relastro/src/share_mean_pos.c	(revision 39457)
@@ -107,5 +107,6 @@
 	continue;
     }
-
+    myAssert (catSeq < Ncatalog, "oops");
+    
     catalog[catSeq].average[objSeq].R = meanpos[i].R;
     catalog[catSeq].average[objSeq].D = meanpos[i].D;
Index: trunk/Ohana/src/relastro/src/share_meas_pos.c
===================================================================
--- trunk/Ohana/src/relastro/src/share_meas_pos.c	(revision 39455)
+++ trunk/Ohana/src/relastro/src/share_meas_pos.c	(revision 39457)
@@ -58,8 +58,4 @@
   off_t i, k;
 
-  int Nmeaspos = 0;
-  MeasPos *measpos = NULL;
-  ALLOCATE (measpos, MeasPos, 1);
-
   fprintf (stderr, "grabbing meas object pos from other hosts...\n");
 
@@ -78,40 +74,39 @@
     LOGRTIME("meas_load_sync host %d loop %d on %s, host %d: %f sec\n", i, nloop, myHostName, REGION_HOST_ID, dtime);
     
-    off_t Nsubset = 0;
+    off_t Nmeaspos = 0;
     char *posfile = make_filename (CATDIR, regionHosts->hosts[i].hostname, regionHosts->hosts[i].hostID, "measpos.fits");
-    MeasPos *measposSubset = MeasPosLoad (posfile, &Nsubset);
+    MeasPos *measpos = MeasPosLoad (posfile, &Nmeaspos);
     free (posfile);
     LOGRTIME("MeasPosLoad host %d loop %d on %s, host %d: %f sec\n", i, nloop, myHostName, REGION_HOST_ID, dtime);
 
-    // merge_meas_pos reallocs measpos and frees the input measposSubset
-    measpos = merge_meas_pos (measpos, &Nmeaspos, measposSubset, Nsubset);
-    LOGRTIME("merge_meas_pos host %d loop %d on %s, host %d: %f sec\n", i, nloop, myHostName, REGION_HOST_ID, dtime);
+    // apply the loaded measurement positions:
+    for (off_t j = 0; j < Nmeaspos; j++) {
+      int objID = measpos[j].objID;
+      int catID = measpos[j].catID;
+
+      // set the meas mag
+      int catSeq;
+      off_t objSeq;
+      if (!catID_and_objID_to_seq (catID, objID, &catSeq, &objSeq)) {
+	// XXX what should I do if this does not match?
+	continue;
+      }
+      myAssert (catSeq < Ncatalog, "oops");
+
+      off_t m = catalog[catSeq].average[objSeq].measureOffset;
+      for (k = 0; k < catalog[catSeq].average[objSeq].Nmeasure; k++, m++) {
+	if (catalog[catSeq].measureT[m].imageID != measpos[j].imageID) continue;
+	catalog[catSeq].measureT[m].R = measpos[j].R;
+	catalog[catSeq].measureT[m].D = measpos[j].D;
+	if (catalog[catSeq].measure) {
+	  catalog[catSeq].measure[m].R = measpos[j].R;
+	  catalog[catSeq].measure[m].D = measpos[j].D;
+	}
+      }
+    }
+    free (measpos);
+    LOGRTIME("match_catID_and_objID/meas loop %d on %s, host %d: %f sec\n", nloop, myHostName, REGION_HOST_ID, dtime);
   }
   LOGRTIME("meas_load_done loop %d on %s, host %d: %f sec\n", nloop, myHostName, REGION_HOST_ID, dtime);
-
-  for (i = 0; i < Nmeaspos; i++) {
-    int objID = measpos[i].objID;
-    int catID = measpos[i].catID;
-
-    // set the meas mag
-    int catSeq;
-    off_t objSeq;
-    if (!catID_and_objID_to_seq (catID, objID, &catSeq, &objSeq)) {
-	// XXX what should I do if this does not match?
-	continue;
-    }
-    off_t m = catalog[catSeq].average[objSeq].measureOffset;
-    for (k = 0; k < catalog[catSeq].average[objSeq].Nmeasure; k++, m++) {
-      if (catalog[catSeq].measureT[m].imageID != measpos[i].imageID) continue;
-      catalog[catSeq].measureT[m].R = measpos[i].R;
-      catalog[catSeq].measureT[m].D = measpos[i].D;
-      if (catalog[catSeq].measure) {
-	catalog[catSeq].measure[m].R = measpos[i].R;
-	catalog[catSeq].measure[m].D = measpos[i].D;
-      }
-    }
-  }
-  free (measpos);
-  LOGRTIME("match_catID_and_objID/meas loop %d on %s, host %d: %f sec\n", nloop, myHostName, REGION_HOST_ID, dtime);
 
   fprintf (stderr, "DONE grabbing meas object pos from other hosts...\n");
Index: trunk/Ohana/src/relastro/test/HostTable.dat.in
===================================================================
--- trunk/Ohana/src/relastro/test/HostTable.dat.in	(revision 39457)
+++ trunk/Ohana/src/relastro/test/HostTable.dat.in	(revision 39457)
@@ -0,0 +1,3 @@
+1 HOSTNAME CATDIR.d1
+2 HOSTNAME CATDIR.d2
+3 HOSTNAME CATDIR.d3
Index: trunk/Ohana/src/relastro/test/RegionHosts.dat.in
===================================================================
--- trunk/Ohana/src/relastro/test/RegionHosts.dat.in	(revision 39457)
+++ trunk/Ohana/src/relastro/test/RegionHosts.dat.in	(revision 39457)
@@ -0,0 +1,2 @@
+1 HOSTNAME 320.0 340.0 -10.0  -0.5
+2 HOSTNAME 320.0 340.0  -0.5  10.0
Index: trunk/Ohana/src/relastro/test/gdb.sh
===================================================================
--- trunk/Ohana/src/relastro/test/gdb.sh	(revision 39457)
+++ trunk/Ohana/src/relastro/test/gdb.sh	(revision 39457)
@@ -0,0 +1,8 @@
+
+define t0
+  set $i = 0
+  while ($i < Nnomask)
+    printf "%d : %f %f %f %f %f\n", $i, fitStats->sample[$i].X, fitStats->sample[$i].Y, fitStats->sample[$i].R, fitStats->sample[$i].D, fitStats->sample[$i].T
+    set $i = $i + 1
+  end
+end
Index: trunk/Ohana/src/relastro/test/run.fakeastro.par
===================================================================
--- trunk/Ohana/src/relastro/test/run.fakeastro.par	(revision 39457)
+++ trunk/Ohana/src/relastro/test/run.fakeastro.par	(revision 39457)
@@ -0,0 +1,39 @@
+#!/bin/csh -f 
+
+set REALRUN = 1
+
+set galaxy = "g0"
+set images = "i0"
+set region = "330 336 -4 2"
+set catdir = "catdir.par"
+
+rm -rf $catdir.$galaxy $catdir.$images
+
+if ($REALRUN) then
+  alias GO 'echo === \!* ===; \!*; if ($status) exit 2'
+else
+  alias GO 'echo === \!* ==='
+endif
+
+alias NO 'echo === skip : \!* ==='
+
+if (-f template.dat == 0) then
+  echo "missing template template.dat"
+  exit 2
+endif
+
+# make the basic fake data
+GO fakeastro -galaxy -region $region -uniform-radec -D CATDIR $catdir.$galaxy -D CATFORMAT PS1_V5 -D SKY_DEPTH 4 -D FAKEASTRO_NSTARS 100000 -D FAKEASTRO_NQSO_ICRF 200 -D FAKEASTRO_NQSO_ZERO 2000 -testing
+GO fakeastro -images -input $catdir.$galaxy -output $catdir.$images -input-images template.dat -region $region -D CATFORMAT PS1_V5 -D SKY_DEPTH 3
+
+set myHost = `hostname`
+set myPath = `pwd`
+cat HostTable.dat.in | sed s/HOSTNAME/$myHost/ | sed "s|CATDIR|$myPath/$catdir.$images|" > $catdir.$images/HostTable.dat
+# XXX catdir currently needs to include the full path
+
+GO dvodist -out $catdir.$images
+
+GO relphot -parallel -averages -region $region -D CATDIR $catdir.$images -update
+
+GO addstar -parallel -resort -region 320 340 -10 10 -D CATDIR $catdir.$images
+
Index: trunk/Ohana/src/relastro/test/run.fakeastro.ser
===================================================================
--- trunk/Ohana/src/relastro/test/run.fakeastro.ser	(revision 39457)
+++ trunk/Ohana/src/relastro/test/run.fakeastro.ser	(revision 39457)
@@ -0,0 +1,37 @@
+#!/bin/csh -f 
+
+set REALRUN = 1
+
+set galaxy = "g0"
+set images = "i0"
+set region = "330 336 -4 2"
+set catdir = "catdir.ser"
+
+rm -rf $catdir.$galaxy $catdir.$images
+
+if ($REALRUN) then
+  alias GO 'echo === \!* ===; \!*; if ($status) exit 2'
+else
+  alias GO 'echo === \!* ==='
+endif
+
+alias NO 'echo === skip : \!* ==='
+
+if (-f template.dat == 0) then
+  echo "missing template template.dat"
+  exit 2
+endif
+
+# make the basic fake data
+GO fakeastro -galaxy -region $region -uniform-radec -D CATDIR $catdir.$galaxy -D CATFORMAT PS1_V5 -D SKY_DEPTH 4 -D FAKEASTRO_NSTARS 100000 -D FAKEASTRO_NQSO_ICRF 200 -D FAKEASTRO_NQSO_ZERO 2000 -testing
+GO fakeastro -images -input $catdir.$galaxy -output $catdir.$images -input-images template.dat -region $region -D CATFORMAT PS1_V5 -D SKY_DEPTH 3
+
+
+
+
+
+
+GO relphot -averages -region $region -D CATDIR $catdir.$images -update
+
+GO addstar -resort -region 320 340 -10 10 -D CATDIR $catdir.$images
+
Index: trunk/Ohana/src/relastro/test/run.relastro.par
===================================================================
--- trunk/Ohana/src/relastro/test/run.relastro.par	(revision 39457)
+++ trunk/Ohana/src/relastro/test/run.relastro.par	(revision 39457)
@@ -0,0 +1,46 @@
+#!/bin/csh -f
+
+set REALRUN = 1
+
+if ($REALRUN) then
+  alias GO 'echo === \!* ===; \!*; if ($status) exit 2'
+else
+  alias GO 'echo === \!* ==='
+endif
+
+set catdir = "catdir.par.i0"
+set region = "-region 320 340 -10 10"
+
+set threads = "-threads 4"
+set threads = ""
+
+set options = ""
+set options = "$options -v"
+set options = "$options -parallel"
+set options = "$options -update"
+set options = "$options -photcode ICRF_S,ICRF_C,ICRF_X,ICRF_U,ICRF_K"
+set options = "$options -D RELASTRO_DPOS_MAX 120"
+set options = "$options -max-mean-offset 120"
+set options = "$options -D RELASTRO_SRC_MEAS_TOOFEW 3"
+set options = "$options  $threads"
+
+if (1) then
+  set mode = "-images -update-chips"
+  GO relastro -D CATDIR $catdir $region $options $mode
+endif
+
+if (1) then
+  set mode = "-update-offsets -pmpar"
+  GO relastro -D CATDIR $catdir $region $options $mode
+endif
+
+if (1) then
+  set mode = "-update-objects -pmpar"
+  GO relastro -D CATDIR $catdir $region $options $mode
+endif
+
+if (1) then
+  set mode = "-images -update-chips -apply-offsets -pmpar"
+  GO relastro -D CATDIR $catdir $region $options $mode
+endif
+
Index: trunk/Ohana/src/relastro/test/run.relastro.par.reg
===================================================================
--- trunk/Ohana/src/relastro/test/run.relastro.par.reg	(revision 39457)
+++ trunk/Ohana/src/relastro/test/run.relastro.par.reg	(revision 39457)
@@ -0,0 +1,37 @@
+#!/bin/csh -f
+
+set REALRUN = 0
+
+if ($REALRUN) then
+  alias GO 'echo === \!* ===; \!*; if ($status) exit 2'
+else
+  alias GO 'echo === \!* ==='
+endif
+
+set catdir = "`pwd`/catdir.par.i0"
+
+set myHost = `hostname`
+cat RegionHosts.dat.in | sed s/HOSTNAME/$myHost/ > $catdir/RegionHosts.dat
+
+set region = "-parallel-regions -region-hosts RegionHosts.dat"
+
+set options = ""
+set options = "$options -v"
+set options = "$options -parallel"
+set options = "$options -update"
+set options = "$options -threads 4"
+set options = "$options -photcode ICRF_S,ICRF_C,ICRF_X,ICRF_U,ICRF_K"
+set options = "$options -D RELASTRO_DPOS_MAX 120"
+set options = "$options -max-mean-offset 120"
+set options = "$options -D RELASTRO_SRC_MEAS_TOOFEW 3"
+
+if (0) then
+  set mode = "-images -update-chips"
+  GO relastro -D CATDIR $catdir $region $options $mode
+endif
+
+if (1) then
+  set mode = "-images -update-chips -apply-offsets -pmpar"
+  GO relastro -D CATDIR $catdir $region $options $mode
+endif
+
Index: trunk/Ohana/src/relastro/test/run.relastro.ser
===================================================================
--- trunk/Ohana/src/relastro/test/run.relastro.ser	(revision 39457)
+++ trunk/Ohana/src/relastro/test/run.relastro.ser	(revision 39457)
@@ -0,0 +1,44 @@
+#!/bin/csh -f
+
+set REALRUN = 1
+
+if ($REALRUN) then
+  alias GO 'echo === \!* ===; \!*; if ($status) exit 2'
+else
+  alias GO 'echo === \!* ==='
+endif
+
+set catdir = "catdir.ser.i0"
+set region = "-region 320 340 -10 10"
+
+set threads = "-threads 4"
+# set threads = ""
+
+set options = ""
+set options = "$options -v"
+set options = "$options -update"
+set options = "$options -photcode ICRF_S,ICRF_C,ICRF_X,ICRF_U,ICRF_K"
+set options = "$options -D RELASTRO_DPOS_MAX 120"
+set options = "$options -max-mean-offset 120"
+set options = "$options -D RELASTRO_SRC_MEAS_TOOFEW 3"
+set options = "$options  $threads"
+
+if (1) then
+  set mode = "-images -update-chips"
+  GO relastro -D CATDIR $catdir $region $options $mode
+endif
+
+if (1) then
+  set mode = "-update-offsets"
+  GO relastro -D CATDIR $catdir $region $options $mode
+endif
+
+if (1) then
+  set mode = "-update-objects -pmpar"
+  GO relastro -D CATDIR $catdir $region $options $mode
+endif
+
+if (1) then
+  set mode = "-images -update-chips -apply-offsets -pmpar"
+  GO relastro -D CATDIR $catdir $region $options $mode
+endif
Index: trunk/Ohana/src/relastro/test/template.dat
===================================================================
--- trunk/Ohana/src/relastro/test/template.dat	(revision 39457)
+++ trunk/Ohana/src/relastro/test/template.dat	(revision 39457)
@@ -0,0 +1,722 @@
+SIMPLE  =                    T /                                                BITPIX  =                    8 /                                                NAXIS   =                    0 /                                                BSCALE  =         1.0000000000 /                                                BZERO   =         0.0000000000 /                                                EXTEND  =                    T /                                                NIMAGES =                  244 /                                                ZERO_PT =        25.0000000000 /                                                DVO_DBID= '2ef3f3a7e738b596b17bf35a643f296d' /                                  FORMAT  = 'PS1_V5  ' /                                                          IMAGEID =                  245 /                                                END                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             XTENSION= 'BINTABLE' /                                                          BITPIX  =                    8 /                                                NAXIS   =                    2 /                                                NAXIS1  =                  360 /                                                NAXIS2  =                  244 /                                                PCOUNT  =                    0 /                                                GCOUNT  =                    1 /                                                TFIELDS =                   55 /                                                EXTNAME = 'DVO_IMAGE_PS1_V5' /                                                  TTYPE1  = 'CRVAL1  ' / coordinate at reference pixel                            TUNIT1  = '        ' /                                                          TFORM1  = 'D       ' /                                                          TTYPE2  = 'CRVAL2  ' / coordinate at reference pixel                            TUNIT2  = '        ' /                                                          TFORM2  = 'D       ' /                                                          TTYPE3  = 'CRPIX1  ' / coordinate of reference pixel                            TUNIT3  = '        ' /                                                          TFORM3  = 'E       ' /                                                          TTYPE4  = 'CRPIX2  ' / coordinate of reference pixel                            TUNIT4  = '        ' /                                                          TFORM4  = 'E       ' /                                                          TTYPE5  = 'CDELT1  ' / degrees per pixel                                        TUNIT5  = '        ' /                                                          TFORM5  = 'E       ' /                                                          TTYPE6  = 'CDELT2  ' / degrees per pixel                                        TUNIT6  = '        ' /                                                          TFORM6  = 'E       ' /                                                          TTYPE7  = 'PC1_1   ' / rotation matrix                                          TUNIT7  = '        ' /                                                          TFORM7  = 'E       ' /                                                          TTYPE8  = 'PC1_2   ' / rotation matrix                                          TUNIT8  = '        ' /                                                          TFORM8  = 'E       ' /                                                          TTYPE9  = 'PC2_1   ' / rotation matrix                                          TUNIT9  = '        ' /                                                          TFORM9  = 'E       ' /                                                          TTYPE10 = 'PC2_2   ' / rotation matrix                                          TUNIT10 = '        ' /                                                          TFORM10 = 'E       ' /                                                          TTYPE11 = 'POLYTERMS' / higher order warping terms                              TUNIT11 = '        ' /                                                          TFORM11 = '14E     ' /                                                          TTYPE12 = 'CTYPE   ' / coordinate type                                          TUNIT12 = '        ' /                                                          TFORM12 = '15A     ' /                                                          TTYPE13 = 'NPOLYTERMS' / order of polynomial                                    TUNIT13 = '        ' /                                                          TFORM13 = 'A       ' /                                                          TTYPE14 = 'TZERO   ' / readout time (row 0)                                     TUNIT14 = '        ' /                                                          TFORM14 = 'J       ' /                                                          TTYPE15 = 'NSTAR   ' / number of stars on image                                 TUNIT15 = '        ' /                                                          TFORM15 = 'J       ' /                                                          TTYPE16 = 'SECZ    ' / airmass                                                  TUNIT16 = 'mag     ' /                                                          TFORM16 = 'E       ' /                                                          TTYPE17 = 'NX      ' / image width                                              TUNIT17 = '        ' /                                                          TFORM17 = 'I       ' /                                                          TTYPE18 = 'NY      ' / image height                                             TUNIT18 = '        ' /                                                          TFORM18 = 'I       ' /                                                          TTYPE19 = 'APMIFIT ' / aperture correction                                      TUNIT19 = 'mag     ' /                                                          TFORM19 = 'E       ' /                                                          TTYPE20 = 'DAPMIFIT' / apmifit error                                            TUNIT20 = 'mag     ' /                                                          TFORM20 = 'E       ' /                                                          TTYPE21 = 'MCAL    ' / calibration mag                                          TUNIT21 = 'mag     ' /                                                          TFORM21 = 'E       ' /                                                          TTYPE22 = 'DMCAL   ' / error on Mcal                                            TUNIT22 = 'mag     ' /                                                          TFORM22 = 'E       ' /                                                          TTYPE23 = 'XM      ' / image chisq                                              TUNIT23 = '10*log(value)' /                                                     TFORM23 = 'I       ' /                                                          TTYPE24 = 'PHOTCODE' / identifier for CCD,                                      TUNIT24 = '        ' /                                                          TFORM24 = 'I       ' /                                                          TTYPE25 = 'EXPTIME ' / exposure time                                            TUNIT25 = 'seconds ' /                                                          TFORM25 = 'E       ' /                                                          TTYPE26 = 'ST      ' / sidereal time of exposure                                TUNIT26 = '        ' /                                                          TFORM26 = 'E       ' /                                                          TTYPE27 = 'LAT     ' / observatory latitude                                     TUNIT27 = 'degrees ' /                                                          TFORM27 = 'E       ' /                                                          TTYPE28 = 'RA_CENTER' / image center                                            TUNIT28 = 'degrees ' /                                                          TFORM28 = 'E       ' /                                                          TTYPE29 = 'DEC_CENTER' / image center                                           TUNIT29 = 'degrees ' /                                                          TFORM29 = 'E       ' /                                                          TTYPE30 = 'RADIUS  ' / image radius                                             TUNIT30 = 'degrees ' /                                                          TFORM30 = 'E       ' /                                                          TTYPE31 = 'REF_COLOR_BLUE' / median astrometry ref color                        TUNIT31 = '        ' /                                                          TFORM31 = 'E       ' /                                                          TTYPE32 = 'REF_COLOR_RED' / median astrometry ref color                         TUNIT32 = '        ' /                                                          TFORM32 = 'E       ' /                                                          TTYPE33 = 'NAME    ' / name of original image                                   TUNIT33 = '        ' /                                                          TFORM33 = '117A    ' /                                                          TTYPE34 = 'DETECTION_LIMIT' / detection limit                                   TUNIT34 = '10*mag  ' /                                                          TFORM34 = 'B       ' /                                                          TTYPE35 = 'SATURATION_LIMIT' / saturation limit                                 TUNIT35 = '10*mag  ' /                                                          TFORM35 = 'B       ' /                                                          TTYPE36 = 'CERROR  ' / astrometric error                                        TUNIT36 = '50*arcsec' /                                                         TFORM36 = 'B       ' /                                                          TTYPE37 = 'FWHM_X  ' / PSF x width                                              TUNIT37 = '25*arcsec' /                                                         TFORM37 = 'B       ' /                                                          TTYPE38 = 'FWHM_Y  ' / PSF y width                                              TUNIT38 = '25*arcsec' /                                                         TFORM38 = 'B       ' /                                                          TTYPE39 = 'TRATE   ' / scan rate                                                TUNIT39 = '100 usec/pixel' /                                                    TFORM39 = 'B       ' /                                                          TTYPE40 = 'CCDNUM  ' / CCD ID number                                            TUNIT40 = '        ' /                                                          TFORM40 = 'B       ' /                                                          TTYPE41 = 'FLAGS   ' / image quality flags                                      TUNIT41 = '        ' /                                                          TFORM41 = 'J       ' /                                                          TTYPE42 = 'IMAGE_ID' / internal image ID                                        TUNIT42 = '        ' /                                                          TFORM42 = 'J       ' /                                                          TTYPE43 = 'PARENT_ID' / associated ref image                                    TUNIT43 = '        ' /                                                          TFORM43 = 'J       ' /                                                          TTYPE44 = 'EXTERN_ID' / external image ID                                       TUNIT44 = '        ' /                                                          TFORM44 = 'J       ' /                                                          TTYPE45 = 'SOURCE_ID' / analysis source ID                                      TUNIT45 = '        ' /                                                          TFORM45 = 'I       ' /                                                          TTYPE46 = 'NLINK_ASTROM' / mean number of matched measurements for astrometry   TUNIT46 = '        ' /                                                          TFORM46 = 'I       ' /                                                          TTYPE47 = 'NLINK_PHOTOM' / mean number of matched measurements for astrometry   TUNIT47 = '        ' /                                                          TFORM47 = 'I       ' /                                                          TTYPE48 = 'UBERCAL_DIST' / distance to nearest ubercal image                    TUNIT48 = '        ' /                                                          TFORM48 = 'I       ' /                                                          TTYPE49 = 'XPIX_SYS_ERR' / systematic astrometry error in X                     TUNIT49 = '        ' /                                                          TFORM49 = 'E       ' /                                                          TTYPE50 = 'YPIX_SYS_ERR' / systematic astrometry error in Y                     TUNIT50 = '        ' /                                                          TFORM50 = 'E       ' /                                                          TTYPE51 = 'MAG_SYS_ERR' / systematic photometry error                           TUNIT51 = '        ' /                                                          TFORM51 = 'E       ' /                                                          TTYPE52 = 'N_FIT_ASTROM' / number of stars used for astrometry cal              TUNIT52 = '        ' /                                                          TFORM52 = 'I       ' /                                                          TTYPE53 = 'N_FIT_PHOTOM' / number of stars used for photometry cal              TUNIT53 = '        ' /                                                          TFORM53 = 'I       ' /                                                          TTYPE54 = 'PHOTOM_MAP_ID' / reference to 2D zero point map                      TUNIT54 = '        ' /                                                          TFORM54 = 'J       ' /                                                          TTYPE55 = 'ASTROM_MAP_ID' / reference to 2D astrometry map                      TUNIT55 = '        ' /                                                          TFORM55 = 'J       ' /                                                          END                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             @tÝ{Ú¿ñ{ð'ÝÀý>
+ª*8`ì8hóŸv?xj¿xRŸvð.·²Û
+žW#+7Åøž9ž
+JF7Š@9ÁhU:äYEºõÃU: ÷9ßf:Ê¬ºæ/!9äÓDEC--DIS       Nk[        r¡u                                            À  À  o5745g0516o.356887.cm.982631.smf[PHU]                                                                                                                                                      ÆeÄÆ
+^q?3,?
+çó?üt<*Ô$=/?ÃµåÇ
+µö,øµÉQº¶
+¶3­"µªÕœ-íÔÌ-è¶Ó.
+.a
+-ÁDa-õàß­>2-ÓÖ;DEC--WRP       Nk[  q?1î            À  ÿ'ÙB4  A¬©IA¥š$            À  À  o5745g0516o.356887.cm.982631.smf[XY01.hdr]                                                                           œ              F  !                                              ÆgÁÅ€~ò?¡?z ?ÿò:š;¡ö?ÿ0µmŽãMX1Ñ +Žä®²ÙîµnWŠ-Ç2-	+»
+-2=O,Ðj-=Î)¬U9.kDEC--WRP       Nk[  	?1î            À  ÿ'ÚB4  A¬©IA¥š$            À  À  o5745g0516o.356887.cm.982631.smf[XY02.hdr]                                                                           ¿              F! !                                              Æi
+Ã>/?Cj?
+
+?ÿ6»¡Œ0O|?ü2µ,X5/ŽÞ5 
+1µVnŽŒN³ 
+É-ãt­cp­¡©ê-ä(®-wl­{Z-6åg.
+ØDEC--WRP       Nk[  
+Ö?1î            À  ÿ'ÛB4  A¬©IA¥š$            À  À  o5745g0516o.356887.cm.982631.smf[XY03.hdr]                                                                           À              F" !                                              Æj8þE©ì?5? ?ÿï:»ö8ê?  3³Ûy±f'öŽ")Ž(Ü3-Ó4è,žv*ÓÞz,¥æ- uo-
+ð¬OÂ=-ŠY.Ò4DEC--WRP       Nk[  	/?1î            À  ÿ'ÜB4  A¬©IA¥š$            À  À  o5745g0516o.356887.cm.982631.smf[XY04.hdr]                                                                           À              F# !                                              Æf æF
+Ø?Œ??ÿÙ;W*»l8>?ÿ¶
+wi3NÏ>4³Žf4Ÿä5Ëë.'²Œ«S­]Û,G Q­áA­¹s,ÀwN-mívDEC--WRP       Nk[  	À?1î            À  ÿ'ÝB4  A¬©IA¥š$            À  À  o5745g0516o.356887.cm.982631.smf[XY05.hdr]                                                                           ¿              F$ !                                              ÆdøÞFj?o?~^?õ°ŒâŒßàë?çU¶åÂ5tµ5P3¶ûÏµo¶î6 1S.Av&­4š­hC-ßÖ±.
+Q®Ro'­Kî
+.	
+ÃDEC--WRP       Nk[  f?1î            À  ÿ'ÞB4  A¬©IA¥š$            À  À  o5745g0516o.356887.cm.982631.smf[XY06.hdr]                                                                           Ÿ              F% !                                              ÆûŸÆjûF?Ðà?1w?íÕ<¶ªŽ=¥Ò?âµ¯
+hµh¥­µ/Áø¶%4Þµš¬¶]Ð-äþ©-SÈô-à#.Åµ,
+.jmÀ-ÓÄ	.cédDEC--WRP       Nk[  ?1î            À  ÿ'âB4  A¬©IA¥š$            À  À  o5745g0516o.356887.cm.982631.smf[XY10.hdr]                                                                           Œ    
+          F& !                                              Æ
+ÕÆ#?~
+?$ÿ?ÿìºËD?»Y
+Ù?ÿ¢µ%HÒ²ïèBµî44`à·4¯ Ž6²2-[,
+±-ælT¬N¬Lºt+Ø
+¬ì«,žaóDEC--WRP       Nk[  ó?1î            À  ÿ'ãB4  A¬©IA¥š$            À  À  o5745g0516o.356887.cm.982631.smf[XY11.hdr]                                                                           ¿    
+       	   F' !                                              Æ,hÅ£
+?Vi?h8?ÿõ:K<î¶?ýÈµ4?3µa²Z
+µC{îŽCqµt-2-%§o«Æ_-Æ[|,×f×-rQ,8-ü DEC--WRP       Nk[  Ù?1î            À  ÿ'äB4  A¬©IA¥š$            À  À  o5745g0516o.356887.cm.982631.smf[XY12.hdr]                                                                           ¿    
+       
+   F( !                                              Æ
+
+óÃ'?W?KY?  9nú»"À ?ÿÍ5
+é3zº+4Qás2óD3Ì×öŽÉIu­V0ò«à/­²Ë¬	
+¬ŸÔ`-
+Š¬­ßÜ.X^DEC--WRP       Nk[  
+A?1î            À  ÿ'åB4  A¬©IA¥š$            À  À  o5745g0516o.356887.cm.982631.smf[XY13.hdr]                                                                           ¿    
+       
+   F) !                                              Æ
+f4E0?ô?£?ÿ×»Ô»=?ÿ»5;(y4RÛî4qÚSŽSŽ.Ìö5ë­€_Ï¬8¬Ø,
+-Hç
+­Ñmh+ðM-ÂzªDEC--WRP       Nk[  7?1î            À  ÿ'æB4  A¬©IA¥š$            À  À  o5745g0516o.356887.cm.982631.smf[XY14.hdr]                                                                           À           
+   F* !                                              Æ­üF
+ÐJ?-1?2[?þ»ÚmœŒJw9?úìµ
+j5dOÕ5Uûµ=|[Ž<c=4ñ`-Â#­G­Á,-É¢5-±­B «³ÛE-sV(DEC--WRP       Nk[  ©?1î            À  ÿ'çB4  A¬©IA¥š$            À  À  o5745g0516o.356887.cm.982631.smf[XY15.hdr]                                                                           ¿           
+   F+ !                                              ÆÝÞFn,ñ?úž?2`?üfŒ*+ð»gWå?ÿµ&M[4zª3°÷ïtŽ×AµbùX58D-zÚ ¬>í­
+-%O­OË
+­-.c­õ-È
+'DEC--WRP       Nk[  h?1î            À  ÿ'èB4  A¬©IA¥š$            À  À  o5745g0516o.356887.cm.982631.smf[XY16.hdr]                                                                           Ÿ              F, !                                              Æ
+ZFÂX?y?î?èÛŒá£¬œÐ§2?~µ»
+:6
+ 5}ü¶Ýò]µ±E
+¶@Ô.7þP®÷[-ÂÈ.ìž«.ç3¯à
+­€^
+®±»öDEC--WRP       Nk[  û?1î            À  ÿ'éB4  A¬©IA¥š$            À  À  o5745g0516o.356887.cm.982631.smf[XY17.hdr]                                                                           œ              F- !                                              ÅòíÆp`Ž?ºÆ?
+ý?ÿ»«Ð< ¢ñ?þ	µ[æ-³üPµÆ])µk!å4õí
+µã7-`	Î©Çå3. (-1×ã-üèz-Ä¿
+­7C.LDEC--WRP       Nk[   ?1î            À  ÿ'ìB4  A¬©IA¥š$            À  À  o5745g0516o.356887.cm.982631.smf[XY20.hdr]                                                                           Ÿ              F. !                                              ÅþÆ"*"?ç?Ge?ü±Œ"|M;Ð)?þµ2 Ž0šá5T Iµ<å4ä15ŽýÂ	-<S©{/­ÛÕ-aK­¡-²$h­º-
+ýDEC--WRP       Nk[  ž?1î            À  ÿ'íB4  A¬©IA¥š$            À  À  o5745g0516o.356887.cm.982631.smf[XY21.hdr]                                                                           ¿               F/ !                                              Å=bÅ€§É?­r?ò?  9AÖÏ:íyï?ÿäŽÚý³Ö|Ž;ÁM³FþŽøŽÃb[-E,û¹,ºR«€OL,s_¹,Ö~^-G
+-\ÞÿDEC--WRP       Nk[  	°?1î            À  ÿ'îB4  A¬©IA¥š$            À  À  o5745g0516o.356887.cm.982631.smf[XY22.hdr]                                                                           ¿              F0 !                                              Å)ÐÃ
+U2?f?4?ÿû:B¢àº÷?ÿõŽH,³ÜôŽ/4Ðú4{¢ë3Õ:ã«àEÔ,í}-©³)­ÙÖY­òoã­Œk­HÜ
+-:ODEC--WRP       Nk[  	?1î            À  ÿ'ïB4  A¬©IA¥š$            À  À  o5745g0516o.356887.cm.982631.smf[XY23.hdr]                                                                           ¿              F1 !                                              Åø?E5Ð?·â?põ?ÿÛ»
+-»ÖÆ?ÿÝŽ°là4E
+4^£ŽŒ³Æ,Z³Âú,,ÓÇ»­5<­óå-M¥5¬ö*°
+@­!Å­­Œ×,DEC--WRP       Nk[  	t?1î            À  ÿ'ðB4  A¬©IA¥š$            À  À  o5745g0516o.356887.cm.982631.smf[XY24.hdr]                                                                           ¿               F2 !                                              Åe)F
+ß¹?§?Ÿ
+?ÿž;@Œ:î?ÿýŽÑ.ó³.!Ö2ÏÆ4ìM46/Ž'A-fÀS¬Wî¬
+¬äã¬^h-fN,«n­žDEC--WRP       Nk[  	e?1î            À  ÿ'ñB4  A¬©IA¥š$            À  À  o5745g0516o.356887.cm.982631.smf[XY25.hdr]                                                                           Ÿ              F3 !                                              Å
+£FnåØ?©¶?Tœ?ÿýº&»|³
+?ÿ³É4®jS4Öd4³õ
+Ð³ï`3_n"¬šŒÇ¬Ëú¿­Kõ±-·±,å~,¢ ªŸl,$>DEC--WRP       Nk[  	=?1î            À  ÿ'òB4  A¬©IA¥š$            À  À  o5745g0516o.356887.cm.982631.smf[XY26.hdr]                                                                           Ÿ              F4 !                                              ÅºFry?³?«å?þÙ»Âô¹ñÎ,?ÿþµVÉ4"Â5có4³©ïŽWŽ5Pµ-Ìä­«²W-Òô-Ôú{¬=åô+
+ys-ÛDEC--WRP       Nk[  3?1î            À  ÿ'óB4  A¬©IA¥š$            À  À  o5745g0516o.356887.cm.982631.smf[XY27.hdr]                                                                           Œ              F5 !                                              ÃêÆróž?k?Ãm?ðÏŒ°&¥;{ÐÒ?ÿ³jZ 3œ¥CŽ³¹£ŽÈj5§Žê-¡_-&ØZ¬`J­k-$é|-npó­Ìœ,n*DEC--WRP       Nk[  	t?1î            À  ÿ'öB4  A¬©IA¥š$            À  À  o5745g0516o.356887.cm.982631.smf[XY30.hdr]                                                                           ¿    
+          F6 !                                              ÂøžÆ#]?Ý¶?G?úŒUÎ¯:æ©Ã?ÿåŽŽ=]µ(S3³OÏ65}Y5/ù-kRÆ+ÓÝT-
+ý-[O®-h«=k­Þ­ÓÚDEC--WRP       Nk[  ^?1î            À  ÿ'÷B4  A¬©IA¥š$            À  À  o5745g0516o.356887.cm.982631.smf[XY31.hdr]                                                                           ¿              F7 !                                              Á¬°þÅ¥>U?}N?ÇÉ?ÿo»æ¶žß?  ³/³ª|ŽËÛŽáÒ5Xñ1ŽÔ=c-Ä«µÎ­wmî,¢z-Á
+n-q®+9--
+ªÃDEC--WRP       Nk[  	v?1î            À  ÿ'øB4  A¬©IA¥š$            À  À  o5745g0516o.356887.cm.982631.smf[XY32.hdr]                                                                           Ÿ               F8 !                                              Áªg=ÃŽè?/H?8­?  ¹Úæ¹íK?ÿþ4[£3Àš:4UÆm²x 3c 3KÈ±­¯ý­Ü¿®ê,
+)­ 1¬ëO¹¬¶
+,Øÿ&DEC--WRP       Nk[  
+?1î            À  ÿ'ùB4  A¬©IA¥š$            À  À  o5745g0516o.356887.cm.982631.smf[XY33.hdr]                                                                           œ    !          F9 !                                              ÁU
+E^Æ??\?,?ÿý:©>¹
+KÉ?  3¥gáŽfJ³6
+Ð4C3¯Ú1ŽX!X«p-
+",óuÌ­
+­ìå-Ðk-2÷Ú­ñÅDEC--WRP       Nk[  Å?1î            À  ÿ'úB4  A¬©IA¥š$            À  À  o5745g0516o.356887.cm.982631.smf[XY34.hdr]                                                                           œ    "       
+   F: !                                              Á±¶F
+Ñ?[?€+?ÿçºâAºú?ë?ÿâ3k*Â³¥jM40¡µ
+Ž&4Ü,;
+,Á^o-U!Û­.×,Ïq®+"ý¬ë
+
+,J[DEC--WRP       Nk[  	o?1î            À  ÿ'ûB4  A¬©IA¥š$            À  À  o5745g0516o.356887.cm.982631.smf[XY35.hdr]                                                                           Ÿ    #       
+   F; !                                              @®wwFo©)?v?XÄ?ý±Œ
+°òºUM?ÿöŽ;24ÇB4Ë9Ž
+&µ1|aŽù¬ÀŸý¬×­`ï.-5þ*®ð¬Êþ­Ÿï­G·DEC--WRP       Nk[  	€?1î            À  ÿ'üB4  A¬©IA¥š$            À  À  o5745g0516o.356887.cm.982631.smf[XY36.hdr]                                                                           Ÿ    $       
+   F< !                                              ÁÔÅFYÃ?j?Ìn?  8Õ¢ºÚ?ÿéŽšà4ð4^QìŽ%û3ÓS5bÖ-Xg+M­ÛK-%üò,4÷[¬±+0Ù-¢!ðDEC--WRP       Nk[  s?1î            À  ÿ'ýB4  A¬©IA¥š$            À  À  o5745g0516o.356887.cm.982631.smf[XY37.hdr]                                                                           œ    %          F= !                                              @³#òFÍa?
+R?È¿ø<|LZ;mzÔ¿ÿ³c;ŽTLðµFC5í5\
+µÎ$¬ÍÎU­LÀ­ÐÞ­ûÙ­±õ%-|
+-F7­»ùDEC--WRP       Nk[  	?1î            À  ÿ( B4  A¬©IA¥š$            À  À  o5745g0516o.356887.cm.982631.smf[XY40.hdr]                                                                           œ    (           F> !                                              Â°nFnâ ?\Â?wÏ¿ÿ;ec¹²
+,¿ÿÿ4<ï1ÉQ]³ÌŽ=o4ÀxÕŽªb{¬çã-UÈÉ«À¥N+À¬ô%_-;#)­	]]DEC--WRP       Nk[  ï?1î            À  ÿ(B4  A¬©IA¥š$            À  À  o5745g0516o.356887.cm.982631.smf[XY41.hdr]                                                                           ¿    )       !   F? !                                              Â®§ÑF
+l?$¶?és¿ÿÿ9Û2&·ÃŸ[¿  Žc³
+pÎ4(4ªz³áÚµÀ,né¬$[­Ä¬Æb-yÒ-C€,2~­¡UNDEC--WRP       Nk[  	u?1î            À  ÿ(B4  A¬©IA¥š$            À  À  o5745g0516o.356887.cm.982631.smf[XY42.hdr]                                                                           Ÿ    *       "   F@ !                                              Â·#EMž?G?3û¿ÿù:nºW¿ÿõ2d+°3Ìè²
+<µŽ
+Í³ž{4
+/k¬5Þ*¬ÅKc,
+)Ô++ÉUE­Ä4¬Í­E,72DEC--WRP       Nk[  Æ?1î            À  ÿ(B4  A¬©IA¥š$            À  À  o5745g0516o.356887.cm.982631.smf[XY43.hdr]                                                                           Ÿ    +       #   FA !                                              Â³¢åÃb$?Há?>é¿ÿý:'0K¹r©×¿  2 (%2Ï0,ŽWc²/Xã3E<2ð@,¬t5­5Vl¬æ.
+Ì,.
+­i	
+­3òDEC--WRP       Nk[  ¿?1î            À  ÿ(B4  A¬©IA¥š$            À  À  o5745g0516o.356887.cm.982631.smf[XY44.hdr]                                                                           œ    ,       $   FB !                                              ÂºIûÅ€Ía?pP?«¿ÿúº`%"»¿ÿÞ4fUþ3T\4y	4}Sö4csò58Ù­w@,;m®­@¿¬Öÿº­./Ô­7i¬è=­ŒèžDEC--WRP       Nk[  æ?1î            À  ÿ(B4  A¬©IA¥š$            À  À  o5745g0516o.356887.cm.982631.smf[XY45.hdr]                                                                           Ÿ     -       %   FC !                                              Âå¯ØÆ#TR?o?è¿ÿ;t::ÎŒ¿ÿëŽ#s³­¹®45ŽÜ8Ž!Ï,³ýý­.H,É-,'Œ­.qï-j,Ý?,HÑDEC--WRP       Nk[  	I?1î            À  ÿ(B4  A¬©IA¥š$            À  À  o5745g0516o.356887.cm.982631.smf[XY46.hdr]                                                                           Ÿ    .       &   FD !                                              Ã²BÆoi?Î?"ã¿ÿ;mLò¹÷ÕV¿ÿþ4|4$q¯4¯ ³Ý?·³*"6+À­e¹¬lÿ¬1Ä­¬ð¯ö,{>*Ó®WWŒDEC--WRP       Nk[  k?1î            À  ÿ(B4  A¬©IA¥š$            À  À  o5745g0516o.356887.cm.982631.smf[XY47.hdr]                                                                           Œ    /       '   FE !                                              Å×ÏF$Ý?5Ð?÷þ¿ÿ¥;M?*<Å¬¿÷ß3ÎLµ5D}³Ã'ù5Éz4]:Æ¶'­<Ó+N­CÕD®0°i­!ûS-ð^÷,à!®=5°DEC--WRP       Nk[  	²?1î            À  ÿ(
+B4  A¬©IA¥š$            À  À  o5745g0516o.356887.cm.982631.smf[XY50.hdr]                                                                           œ    2       (   FF !                                              Å>ýFnkr?M=?S¿ÿ!»šÉ:·í-¿ÿï5u1²¿*yŽc4è4¶Øµúûµ%:®o\«`=-}&¬«_¬,
+Eß-Xµ­Ý­vnÆDEC--WRP       Nk[  
+\?1î            À  ÿ(
+B4  A¬©IA¥š$            À  À  o5745g0516o.356887.cm.982631.smf[XY51.hdr]                                                                           Ÿ    3       )   FG !                                              ÅdàF
+ZH?ÐÌ?øc¿ÿ»tJÏ:ýP"¿ÿá5îaŽgfŽ~ŠÏ4'\ÚµsSµ9XH­^Ê,ý
+H-/­^w@+É"Æª«Æ­ÇŽ{­õdfDEC--WRP       Nk[  Õ?1î            À  ÿ(
+B4  A¬©IA¥š$            À  À  o5745g0516o.356887.cm.982631.smf[XY52.hdr]                                                                           Ÿ    4       *   FH !                                              ÅUEê»?
+ü?m^¿ÿòº©ÊH;d\¿ÿŽn¶ÖŽÝÙø4R4$§ŽæÎŽ2U-
+,-ì«}$)fÒB.BU-t¢­Ï×­ÄXDEC--WRP       Nk[  «?1î            À  ÿ(
+B4  A¬©IA¥š$            À  À  o5745g0516o.356887.cm.982631.smf[XY53.hdr]                                                                           ¿    5       +   FI !                                              ÅàþÃÛ¿?òu?L¶¿ÿûºHQv»XŠ
+¿ÿ£5"
+[4ÔÙ4â¢2Ze
+³\®52dve­±Ã­Nà­cÌ"+³®À­«[l-ðÚ.2u5­ýÎDEC--WRP       Nk[  c?1î            À  ÿ(B4  A¬©IA¥š$            À  À  o5745g0516o.356887.cm.982631.smf[XY54.hdr]                                                                           ¿     6       ,   FJ !                                              ÅÈÅ€æ6?ö?Jà¿ÿŠ;U«»7êÂ¿ÿ¿4Éá4W]³P4ü[ŽÑQY5ZF­¥
+8¬«-_
+­
+¬þ×è­
+5-¡<­åð:DEC--WRP       Nk[  	
+?1î            À  ÿ(B4  A¬©IA¥š$            À  À  o5745g0516o.356887.cm.982631.smf[XY55.hdr]                                                                           ¿     7       -   FK !                                              Å
+Æ"ÐÆ?Ã?¯
+¿ùŒm
+Û»q{"¿ÿ5q1Õ©Ž¯>5/1]5®|^3ËHo­³,R­
+D£­*°-Å­³Æê®'ý×,ŠDEC--WRP       Nk[  º?1î            À  ÿ(B4  A¬©IA¥š$            À  À  o5745g0516o.356887.cm.982631.smf[XY56.hdr]                                                                           œ    8       .   FL !                                              ÅèÆoÁ??l¶¿ÿ;f§ì»¯>¿ÿ!51Î32a­³­04ÿr§2vŒ#6%;­Mc+þD¢­±­Pc,ë"z­x,Ù¬Ú
+®0äÐDEC--WRP       Nk[  #?1î            À  ÿ(B4  A¬©IA¥š$            À  À  o5745g0516o.356887.cm.982631.smf[XY57.hdr]                                                                           œ    9       /   FM !                                              ÆKcFÀ¹?
+íC?Û¿þž;Ð*j<S€
+¿ú\5ÉÕOµ
+¶25%éØŽj!>µX­×Q«-
+V".!`­å3œ®E£
+-Âš­.wÞ­ÑwªDEC--WRP       Nk[  ¬?1î            À  ÿ(B4  A¬©IA¥š$            À  À  o5745g0516o.356887.cm.982631.smf[XY60.hdr]                                                                           µ    <       0   FN !                                              Æ
+'FpÀ?Ä?1T¿þ/»ôgŒ"á9¿üŸ³^>.4\?S5þ±µ6áVŽð4VÖœ*5{à+q&;«/èW-xåu-¶z­	\ß¬ÂT-+FÂDEC--WRP       Nk[  n?1î            À  ÿ(B4  A¬©IA¥š$            À  À  o5745g0516o.356887.cm.982631.smf[XY61.hdr]                                                                           Œ    =       1   FO !                                              ÆØÊF
+(=?U?
+{¿ýñ<Â;ûÕ¿þ5}°µ5D]µ0Ä4Úý
+41CŽíC­.E²-
+`- ­br-­yë,µ|]¬
+­q
+HDEC--WRP       Nk[  ?1î            À  ÿ(B4  A¬©IA¥š$            À  À  o5745g0516o.356887.cm.982631.smf[XY62.hdr]                                                                           Ÿ    >       2   FP !                                              Æ
+ÁÒE¿F?Ÿ?^¿ÿ;s'ö;4%	¿ÿÀ4|jŽ
+ŒÂµ&ã%Ž7·\4Q³
+3KÇ^¬Õ%É,zÔÄ--,Œãy®B>­J®®Œ(­rÉ·DEC--WRP       Nk[  Š?1î            À  ÿ(B4  A¬©IA¥š$            À  À  o5745g0516o.356887.cm.982631.smf[XY63.hdr]                                                                           ¿    ?       3   FQ !                                              Æ
+(Ã3
+-?{?R8¿ÿ²»Gz;l¿ÿ>Ž÷éñŽô&4£Ý2Ðñ3
+4cÔû-aZ-2­
+_S«Å'ð­
+¶,cZ-)@­ÛjDEC--WRP       Nk[  V?1î            À  ÿ(B4  A¬©IA¥š$            À  À  o5745g0516o.356887.cm.982631.smf[XY64.hdr]                                                                           ¿    @       4   FR !                                              Æ
+oDÅ¥Ür?[Þ?'¿ÿý:pÓ;6ä¿ÿŸ500wŽ*
+4g
+ŽÌ
+³ 4
+"$­~]*ï9
+­Höò-e6y,T{,-¥,
+z±¬ÃjÝDEC--WRP       Nk[  
+9?1î            À  ÿ(B4  A¬©IA¥š$            À  À  o5745g0516o.356887.cm.982631.smf[XY65.hdr]                                                                           ¿     A       5   FS !                                              Æ
+lÆ"$??îª¿ýŒ
+vŒT¿ýÁ³sÐ4ÿÛ3ÜÂ4}&5W~U4ä<
+«ëP­.Þ,Ã3­K¥ð­ZÏK« ŠQ­T×­[§dDEC--WRP       Nk[  	v?1î            À  ÿ(B4  A¬©IA¥š$            À  À  o5745g0516o.356887.cm.982631.smf[XY66.hdr]                                                                           ¿    B       6   FT !                                              ÆØÆnª
+?} ?¿üÕŒ
+ŽŒžÓ¿ïü5nò56+5óëx5ü4è4&
+¿6­M­'Û­GZ­»/­é¡X®/®:2,gRé®
+ DEC--WRP       Nk[  ?1î            À  ÿ(B4  A¬©IA¥š$            À  À  o5745g0516o.356887.cm.982631.smf[XY67.hdr]                                                                           »    C       7   FU !                                              ÆdFkj?dÞ?Ý¿Û=
+9Ö<±ë)¿ï¶67åµ?g¶'²b5æ÷5ÁLµÔ®ÔD-(jÀ.]sk­Ìª®#1.<Tì-[å5­u
+hDEC--WRP       Nk[  ?1î            À  ÿ(B4  A¬©IA¥š$            À  À  o5745g0516o.356887.cm.982631.smf[XY71.hdr]                                                                           µ    G       8   FV !                                              ÆgÓOF
+k{?žY?@¿ùì<cVá;Íøß¿þš5³­<ŽE®µ¡ùz4}58^µeêê­ÆÆŽ,ÃGy.	œ+§·­-Î@¹-Õ7y­³ÇDEC--WRP       Nk[  ß?1î            À  ÿ( B4  A¬©IA¥š$            À  À  o5745g0516o.356887.cm.982631.smf[XY72.hdr]                                                                           œ    H       9   FW !                                              Æhþ6E*??*²¿ÿm;²­»21Ã¿ÿÁ5ª>4-xmŽF*5[¯4¶è3Žjw­¿y¬¯»,Ö® ­Ý8W­h¬×Ê-@ú­é[wDEC--WRP       Nk[  þ?1î            À  ÿ(!B4  A¬©IA¥š$            À  À  o5745g0516o.356887.cm.982631.smf[XY73.hdr]                                                                           Ÿ    I       :   FX !                                              ÆiËZÃ¥]?nC?<¿þm;äuº'`È¿ÿý50ÆB3»EÛµ>3L4r
+}³ÁL5w8­Ú³¬<ýß- 
+¬¯>W,ÛoS­z<­"é­®
+ÅDEC--WRP       Nk[  ÷?1î            À  ÿ("B4  A¬©IA¥š$            À  À  o5745g0516o.356887.cm.982631.smf[XY74.hdr]                                                                           ¿    J       ;   FY !                                              ÆgJ€Å£óA?
+|Ð?Ù>¿ýCŒÏ
+»õ¿ÿu5çÀp4Ù5f³A5`Û24ÒÔ59§®	sg«òý¯­¡«­åO­Ÿ£ï­«öù¬/ú­~ôDEC--WRP       Nk[  ?1î            À  ÿ(#B4  A¬©IA¥š$            À  À  o5745g0516o.356887.cm.982631.smf[XY75.hdr]                                                                           Ÿ     K       <   FZ !                                              ÆcâlÆ"V±?w?HÁ¿Ôæœµ»Ü¿ÿ86
+_Ò4ð×J6[
+ÉŽ+U5³M5
+¹® 
+À­m®;­-^L®i8­U§"­&kÖ­¿ DEC--WRP       Nk[  x?1î            À  ÿ($B4  A¬©IA¥š$            À  À  o5745g0516o.356887.cm.982631.smf[XY76.hdr]                                                                           œ    L       =   F[ !                              @tÝ{ÖeK¿ñ{óAi4À×²?#G8^P8fŸv€?xjæ¿x#ŸvÚ·¥Þžqê7 ¿â·ê?ž+üW6ï­9Å#©:å º÷59÷i_9ãµ:ÌÏ«ºåú9ä]'DEC--DIS       NmŽ        t¡                                            À  À  o5745g0526o.356899.cm.982643.smf[PHU]                                                                                              >                                                        ÆeÇÃÆ
+c?d?L¡?ÿy;â4=&ÕE?Ép¶]µå¿µ€ôÍ¶
+³l4ásµÆšö.
+-Õ©.V.\ð-S
+U.[ð­
+-ù×õDEC--WRP       NmŽ  e?"Ñî            À  ÿ'ÙB4  A®  A¥š$            À  À  o5745g0526o.356899.cm.982643.smf[XY01.hdr]                                                                           Œ           ?   >Hð !                                              Æg5Å€ö?Nê?©ª?ÿ®;OÅ:òX?ÿãµºxŽ{ÙšŽGÒŽýÆ³6¹µ
+>¡-îmÌ,±Ù,¶s³-A--Ã-«-¬Z².PDEC--WRP       NmŽ  Ã?"Ñî            À  ÿ'ÚB4  A®  A¥š$            À  À  o5745g0526o.356899.cm.982643.smf[XY02.hdr]                                                                           œ           @   >Hñ !                                              ÆhêrÃAØ ?
+)?	;?ÿ»Ž öŒ6Hþ?ûêµIíI53vY52ù}µF<Ž¬ä³AB-Ê­­hXy­°ÿ-ØÛ2-No­2]-KÉŠ.DEC--WRP       NmŽ  
+u?"Ñî            À  ÿ'ÛB4  A®  A¥š$            À  À  o5745g0526o.356899.cm.982643.smf[XY03.hdr]                                                                           Ÿ           A   >Hò !                                              Æi§ E?~
+?k|?ÿÀ;5
+Ü;ªah?ÿ
+ŽŽ\ËŽ¢5ŽÈŽ®ï4ný4±Ë-2ì,Ò
+V,ÉYW,Ž¬æL¬ÌX-Þ.
+$<DEC--WRP       NmŽ  	
+?"Ñî            À  ÿ'ÜB4  A®  A¥š$            À  À  o5745g0526o.356899.cm.982643.smf[XY04.hdr]                                                                           Ÿ           B   >Hó !                                              ÆfÏ9F
+V?
+Ç}?:L?ÿö:îö»Ð4?þ¶
+k46×r4á¶çŽ×84sõz5(õÖ.
+þ¬Jzg­
+×,Ø8r«ä×­Åö-èM-h§DEC--WRP       NmŽ  	f?"Ñî            À  ÿ'ÝB4  A®  A¥š$            À  À  o5745g0526o.356899.cm.982643.smf[XY05.hdr]                                                                           Ÿ           C   >Hô !                                              ÆdFj\±?5?Üð?ðŒµ&$ŒßäN?çe¶Š-5}þ5Ÿ€0¶
+úŸµîÎ6Á.3q­j'ô­Á\-úÑi.Å®Yã­_!.ÆDEC--WRP       NmŽ  )?"Ñî            À  ÿ'ÞB4  A®  A¥š$            À  À  o5745g0526o.356899.cm.982643.smf[XY06.hdr]                                                                           œ           D   >Hõ !                                              ÆÙñÆk?Æ®?Š¯?éö<Éåž<á®8?éµê·µaš&µJ?¶
+e µµ]7¶Y¡L-Ê.Ú-hE-×ç»-ëgF-	uÔ.G#-Þ³@.g.&DEC--WRP       NmŽ  å?"Ñî            À  ÿ'âB4  A®  A¥š$            À  À  o5745g0526o.356899.cm.982643.smf[XY10.hdr]                                                                           Œ    
+       E   >Hö !                                              ÆÚQÆ#¬j?æÁ?÷
+?  8j±»Xh?ÿ¢µZSx³¿Âëµ%4§¯94yÚ`³ßœ-gÝ&,Þ
+
+-æai¬ïß_«q*×
+¬°h,,
+	®DEC--WRP       NmŽ  ?"Ñî            À  ÿ'ãB4  A®  A¥š$            À  À  o5745g0526o.356899.cm.982643.smf[XY11.hdr]                                                                           Ÿ    
+       F   >H÷ !                                              Æù+Å£tä?È6?»?ÿÛ;
+CÒ<
+ñ?ý£µv}IµóÀ³uC§µNSþŽÂµ3ï-Çà€-%\«-¿Éb-«Õ-KsÜ,&B-Ž	wDEC--WRP       NmŽ  ?"Ñî            À  ÿ'äB4  A®  A¥š$            À  À  o5745g0526o.356899.cm.982643.smf[XY12.hdr]                                                                           Ÿ    
+       G   >Hø !                                              Æ
+ÛÃ-°ó?_>?E
+?  9GÆ»x8Ü?ÿ4÷ÒB4( 4X¿Ü3~K3ÙdºŽÀžL­BKR¬`ä­U¬ds¬Ûy,÷²¬«Ô°.DDEC--WRP       NmŽ  
+??"Ñî            À  ÿ'åB4  A®  A¥š$            À  À  o5745g0526o.356899.cm.982643.smf[XY13.hdr]                                                                           Ÿ    
+       H   >Hù !                                              Æ
+r
+EÏð?n?±p?ÿÊ»$¡»³ ?ÿ
+57wK4Òõ4ygŽ k[Ži&4ÿEè­ J}­&Õ¬þ¿ÿ,¥KÆ-€­Ÿó,Ø1-Ÿh_DEC--WRP       NmŽ  $?"Ñî            À  ÿ'æB4  A®  A¥š$            À  À  o5745g0526o.356899.cm.982643.smf[XY14.hdr]                                                                           ¿           I   >Hú !                                              ÆlUF
+å?Ë5?&?þm»åû!Œ66ð?û×µŽÕ75G¶s5bù#µ9ÄŽP/ã4ºÁ.	[÷­{C­Ë|W-×YÕ-Y
+­ ¡ä««Ç--FÀDEC--WRP       NmŽ  b?"Ñî            À  ÿ'çB4  A®  A¥š$            À  À  o5745g0526o.356899.cm.982643.smf[XY15.hdr]                                                                           Ÿ           J   >Hû !                                              ÆtLFn-?[¥?aú?þh»á
+Ü»Z?ÿßŽœí§3Òc€ŽlirŽåfµ86N5Ì-2µ«JgÄ¬ã[
+-(]­VOÄ­;á­Ò5Ü-Þ]üDEC--WRP       NmŽ  6?"Ñî            À  ÿ'èB4  A®  A¥š$            À  À  o5745g0526o.356899.cm.982643.smf[XY16.hdr]                                                                           Ÿ           K   >Hü !                                              ÆY÷F
+w?K²?(?ÃØœ0þŸEð³?{µ«Hx7	EI3Ã\é·Ls}¶,4¶â.
+Û®ódÛ­4eµ/w.¬
+®¯^.®e +¯%ÊDEC--WRP       NmŽ  ê?"Ñî            À  ÿ'éB4  A®  A¥š$            À  À  o5745g0526o.356899.cm.982643.smf[XY17.hdr]                                                                           œ           L   >Hý !                                              Å
+èÆoÿú?ñj?,?ýžŒù<)
+ß?üµ	¢ŽµÉ'Œµ;5(4Õµ÷Bœ-~zw,XZ.
+é-mÙ-êjâ-äD­g@§.
+·ÛDEC--WRP       NmŽ  ²?"Ñî            À  ÿ'ìB4  A®  A¥š$            À  À  o5745g0526o.356899.cm.982643.smf[XY20.hdr]                                                                           œ           M   >Hþ !                                              Å Æ" Š?üt?a?þ»Õ&õ;ß0?þŽójŽT±4øïTµKë4Ž)µ	ë-MÊªÙŽà­®®-5¬ßÞô-Žª5¬µú-&QÅDEC--WRP       NmŽ  ³?"Ñî            À  ÿ'íB4  A®  A¥š$            À  À  o5745g0526o.356899.cm.982643.smf[XY21.hdr]                                                                           Ÿ           N   >Hÿ !                                              ÅRyÅ€¿?«?¿?ÿý:^:²û?ÿðŽÈeè²ÊúŽG»ª³ÁŽŒÒŽª-y­5,kó,ÍÌ#)œé,o·°-ØÜ-1ª-
+fnDEC--WRP       NmŽ  	b?"Ñî            À  ÿ'îB4  A®  A¥š$            À  À  o5745g0526o.356899.cm.982643.smf[XY22.hdr]                                                                           Ÿ           O   >I  !                                              Å:mÃ
+QS?1?"?ÿõ:cº7/?ÿüŽLÙ³ôòŽ]ÅÍ4+4@Ã3z­
++.'-8V-¯ŸÃ­®D­ÃHÎ­>Ÿ­$ð
+-úçDEC--WRP       NmŽ  	F?"Ñî            À  ÿ'ïB4  A®  A¥š$            À  À  o5745g0526o.356899.cm.982643.smf[XY23.hdr]                                                                           Ÿ           P   >I !                                              Å%
+E!8?ø?f»?ÿåºë
+»+:g?ÿÇŽN+o4ŸÓæ4_YŽK
+m³ØkŽ
+óµ*5 &­vØ)­|P«-
+8w­(f,`1	­
+Ú­ÊQDEC--WRP       NmŽ  	'?"Ñî            À  ÿ'ðB4  A®  A¥š$            À  À  o5745g0526o.356899.cm.982643.smf[XY24.hdr]                                                                           Ÿ           Q   >I !                                              ÅF
+ÔH?¶¥?Ô5?ÿ
+;|vù9ñ§Ô?ÿþŽå ³x
+ù3
+XÂ4gŽó4_ŽnN-`xª9¬FÃªN%«Â^Ž-?}Ô-/Bj¬`XDEC--WRP       NmŽ  þ?"Ñî            À  ÿ'ñB4  A®  A¥š$            À  À  o5745g0526o.356899.cm.982643.smf[XY25.hdr]                                                                           œ           R   >I !                                              Å-ŠFnJ?Éä?»Þ?  9I»ÈKç?þÆŽ5Ôl4óx4æX,Žø2ÒÝ4õô«/ø[­¢­T1s-Ç©æ-J+EoG+¿T*,Õ5DEC--WRP       NmŽ  Þ?"Ñî            À  ÿ'òB4  A®  A¥š$            À  À  o5745g0526o.356899.cm.982643.smf[XY26.hdr]                                                                           œ           S   >I !                                              ÅeFr?vc?¿F?þL»ëÄ€:¥F?ÿóŽÿ¢4s€g5T+	3©lŽ[`5`-ÒOå¬çW8+<Þ-®¹-Ïr»+°>
+«{Ã[-€nvDEC--WRP       NmŽ  Ø?"Ñî            À  ÿ'óB4  A®  A¥š$            À  À  o5745g0526o.356899.cm.982643.smf[XY27.hdr]                                                                           Œ           T   >I !                                              ÃCâÆr?­õ?H¡?òmŒ¥ñä;ÂÆ?ÿk²ÔpJ4,;ŽÕ#ŠŽì5;TŽóÆ-]ù,Éoè¬IÔ­F ^-BÍI-
+­Àdj-Ý DEC--WRP       NmŽ  ó?"Ñî            À  ÿ'öB4  A®  A¥š$            À  À  o5745g0526o.356899.cm.982643.smf[XY30.hdr]                                                                           œ    
+       U   >I !                                              ÂìeÆ#xu?Ì??0m?û¥Œ?E:áú?ÿæŽà-Ž&Uµ1³*5_P5 š-®>ª€¶æ-Né»-Q%J-\ª'¥P­Ão­còDEC--WRP       NmŽ  ?"Ñî            À  ÿ'÷B4  A®  A¥š$            À  À  o5745g0526o.356899.cm.982643.smf[XY31.hdr]                                                                           Ÿ           V   >I !                                              ÁÄ(ËÅ¥S5?¶?œC?ÿ}»qn¹Nn?  ³ ·³4pŽÆpŽ¬D@5S²+Ž·tN-ü¬U,M­ =±,*®
+-±mà-§öÞ®&,áž¯DEC--WRP       NmŽ  	
+?"Ñî            À  ÿ'øB4  A®  A¥š$            À  À  o5745g0526o.356899.cm.982643.smf[XY32.hdr]                                                                           œ            W   >I !                                              ÁÅ-)ÃV?0t?:Ä?  ¹;|Nº°y?ÿý4HÍ3âKq4w\Ù²"R3ÈÍð3W¿0­;UŒ­Ñ¹®õd*6û­%û/¬v­š,žiDEC--WRP       NmŽ  W?"Ñî            À  ÿ'ùB4  A®  A¥š$            À  À  o5745g0526o.356899.cm.982643.smf[XY33.hdr]                                                                           Œ    !       X   >I	 !                                              Á±Ñ0EQ?Dþ?3Ñ?ÿý:àk¹æ}?ÿÿ3eš©Ž
+zF²Í4uî3QgŽ%ì²)Ïá-/3/,Ð­[Ï¬¡y-¶?,ôu£­X4DEC--WRP       NmŽ  ?"Ñî            À  ÿ'úB4  A®  A¥š$            À  À  o5745g0526o.356899.cm.982643.smf[XY34.hdr]                                                                           Œ    "       Y   >I
+ !                                              ÁwF
+Ñ?cz?ŒZ?ÿèºÛ%§»?ÿÝ31
+³ÎÞ48p&µ&<Ž-
+4°	J,ä`õ,¿
+-t(E­Zªú-/]K®66z¬Á,Ä@vDEC--WRP       NmŽ  	?"Ñî            À  ÿ'ûB4  A®  A¥š$            À  À  o5745g0526o.356899.cm.982643.smf[XY35.hdr]                                                                           œ    #       Z   >I
+ !                                              A
+ëFo«ö??Hñ?üàŒ!Pºòkê?ÿãŽz>4&¬o4fìŽvÇµO<Áµ­î¬Èhš¬
+Ó­-,m,R­'Ð;­®9€­\qpDEC--WRP       NmŽ  	{?"Ñî            À  ÿ'üB4  A®  A¥š$            À  À  o5745g0526o.356899.cm.982643.smf[XY36.hdr]                                                                           œ    $       [   >I
+ !                                              ÁrtÌFÓ?Æ?>?ÿÔ»žº©ÇÑ?ÿòŽÇ3¹ý4Nàg³ôá³Üut5&5-Ñ	,¬Ø3­w1k-o+âÝI¬vQ«Íp*-ÈDEC--WRP       NmŽ  b?"Ñî            À  ÿ'ýB4  A®  A¥š$            À  À  o5745g0526o.356899.cm.982643.smf[XY37.hdr]                                                                           œ    %       \   >I
+ !                                              Á?@F¿W?êÎ? ©¿û<Eµ;3õ¿ÿÃ³9öÜŽ`UVµ8È4Ù;é5/
+Pµ£3­(n­
+­
+5­Ü­ø;-Ipâ-\ó­ËKðDEC--WRP       NmŽ  	V?"Ñî            À  ÿ( B4  A®  A¥š$            À  À  o5745g0526o.356899.cm.982643.smf[XY40.hdr]                                                                           œ    (       ]   >I !                                              Â»œOFnÔù?K?ß¿ÿð:·'¶
+ñ9¿  3¥ÕÃ2Sæ°D5<Ž
+&k4]ÑFŽ¢ö·-$wi¬¯±S-5í*6,Æä¬§ž,ójL­
+,DEC--WRP       NmŽ  Ï?"Ñî            À  ÿ(B4  A®  A¥š$            À  À  o5745g0526o.356899.cm.982643.smf[XY41.hdr]                                                                           œ    )       ^   >I !                                              Âªú¥F
+rd? w?í>¿  ¹=*ž¶
+N¿  Ž1­²vº44¡aR³ÍÕµ%`,®£x¬¯7­¢yº«ÌœÝ-|í -
++£¯Î­€v»DEC--WRP       NmŽ  Ö?"Ñî            À  ÿ(B4  A®  A¥š$            À  À  o5745g0526o.356899.cm.982643.smf[XY42.hdr]                                                                           œ    *       _   >I !                                              Â°À?EYä?J@?9¿ÿú:`sº`õ¿ÿ÷2Ó&3¢^ ²lH³ÜÍL³±03ÉV8¬Q­ Î+(€ç«+¬­Š]­ÑºªÎ]DEC--WRP       NmŽ  ?"Ñî            À  ÿ(B4  A®  A¥š$            À  À  o5745g0526o.356899.cm.982643.smf[XY43.hdr]                                                                           Œ    +       `   >I !                                              Â­/<ÃÎ?L?A¡¿ÿþ:³œž³ùm¿  2Ñh1±v'ŽEù²¥yM3¶§Ý3bF,n
+§«Li­SZ-¬Wê².ÿû,VO­|Á­FXDEC--WRP       NmŽ  {?"Ñî            À  ÿ(B4  A®  A¥š$            À  À  o5745g0526o.356899.cm.982643.smf[XY44.hdr]                                                                           Œ    ,       a   >I !                                              Â¯")Å€¶?pÀ?&û¿ÿâº÷óÿ»Ž~¿ÿÙ4w: 3ZáZ4_ÒÞ4¹>4³~+5D­dú,D.­`§¬Õ_
+¬ðœ­qý­Q§á­Éþ¿DEC--WRP       NmŽ  ?"Ñî            À  ÿ(B4  A®  A¥š$            À  À  o5745g0526o.356899.cm.982643.smf[XY45.hdr]                                                                           œ    -       b   >I !                                              Âã§€Æ#_0?aÞ?É€¿ÿy;ë;µ¿ÿßŽK³ŸŸ4XIŒŽø
+!Ž9ËŽN¬­^£+§N+-Ì'Å,ß²ü­$w-ââ, 
+Q,0
+DEC--WRP       NmŽ  ã?"Ñî            À  ÿ(B4  A®  A¥š$            À  À  o5745g0526o.356899.cm.982643.smf[XY46.hdr]                                                                           œ    .       c   >I !                                              Âø
+cÆoÄ÷??àß¿ÿ¶;:ð:EÊ\¿ÿü4 j4Ý4
+æŽióc³D6$é­CH¬-pÇ«_­\¬åè	¬êÝ,ãpª«^®PòýDEC--WRP       NmŽ  z?"Ñî            À  ÿ(B4  A®  A¥š$            À  À  o5745g0526o.356899.cm.982643.smf[XY47.hdr]                                                                           Œ    /       d   >I !                                              Å€FÝå?Y?Œû¿ÿö:OZ<À^¿ö34"ºCµPÉŽ&à5ÖuÜ3¹+ð¶8
+1­ø,\ñ­2.¬®7à	­;Ü. Ä
+,ŽW®ONdDEC--WRP       NmŽ  	?"Ñî            À  ÿ(
+B4  A®  A¥š$            À  À  o5745g0526o.356899.cm.982643.smf[XY50.hdr]                                                                           œ    2       e   >I !                                              ÅèHFnbû?RÞ?r ¿ÿ»gR_:Ñeª¿ÿë5n'²
+EŽV4Ìæ`ŽëÐµ3üù®€Ú¬f
+F-­'A¬{R»-T­fŽ­§ôDEC--WRP       NmŽ  
+ö?"Ñî            À  ÿ(
+B4  A®  A¥š$            À  À  o5745g0526o.356899.cm.982643.smf[XY51.hdr]                                                                           œ    3       f   >I !                                              Å7KF
+]Ž?ï?O¿ÿ»tÀ2:ž?·¿ÿï5 ×¶Ž:­Ž>ñ4%GJµdíµUJÖ­¥.¯,-Nù­KÕ,(Û*ãdu­Åö7®
+äDEC--WRP       NmŽ  Ž?"Ñî            À  ÿ(
+B4  A®  A¥š$            À  À  o5745g0526o.356899.cm.982643.smf[XY52.hdr]                                                                           œ    4       g   >I !                                              ÅBŸEþ?¯?o®¿ÿðºŽþÌ;?m
+¿ÿ¹Žn·Ž®ç4f#Û41|ÄŽÙRŽ*fe-¥Ì-xo¬#g
+«lQ¡.>-mê
+­Ž¡
+¬ûW{DEC--WRP       NmŽ  n?"Ñî            À  ÿ(
+B4  A®  A¥š$            À  À  o5745g0526o.356899.cm.982643.smf[XY53.hdr]                                                                           Ÿ    5       h   >I !                                              ÅÑ®Ã¹º?äÍ?U¿ÿúº[§X»\%
+¿ÿ¡5Ø4Ö54M­3FÓ³;/03@­¥÷Ã­{5­CcJªØ0×­°Ö-k.2]o­ËšDEC--WRP       NmŽ  ??"Ñî            À  ÿ(B4  A®  A¥š$            À  À  o5745g0526o.356899.cm.982643.smf[XY54.hdr]                                                                           Ÿ    6       i   >I !                                              Åî©Å€Øo?¬¬?PS¿ÿ°;IB»6"¿ÿÀ5dË4]³ÎŠ}4òhŽŒµ5a×+­Ùõ©¬³
+à-®e­ MQ­Vé­}Eª-ÞÄ­õ©¥DEC--WRP       NmŽ  Þ?"Ñî            À  ÿ(B4  A®  A¥š$            À  À  o5745g0526o.356899.cm.982643.smf[XY55.hdr]                                                                           Ÿ    7       j   >I !                                              Å¹7Æ"Ó?±/?i¿÷Œ%
+»±·¿ÿ
+5 ¬4F$Ž*RË5C
+¶5·W4mH­ë¬w/ý­O­G¹*-z­Ähá®,&G¬9DEC--WRP       NmŽ  ?"Ñî            À  ÿ(B4  A®  A¥š$            À  À  o5745g0526o.356899.cm.982643.smf[XY56.hdr]                                                                           Œ    8       k   >I
+ !                                              ÅF­Æoú?ë?
+¿ÿ©;L@U»9¿ÿ]5Fq3kÛ03\
+4ÌÖ	1ÂÅ6
+Rú­¡,Œ+3*­\ä¬ñ3f,|ñ­N£Ò«Æz2®*
+DEC--WRP       NmŽ  %?"Ñî            À  ÿ(B4  A®  A¥š$            À  À  o5745g0526o.356899.cm.982643.smf[XY57.hdr]                                                                           Œ    9       l   >I
+ !                                              ÆœFj?
+M
+?¿L¿þë»ÀŸ:íê[¿ÿã5ÒâŠŽÑ¿žµÕ^4'µ8Mµd°*®Gš---ô
+­ïS®hž,ø@­°ê­¢à4DEC--WRP       NmŽ  b?"Ñî            À  ÿ(B4  A®  A¥š$            À  À  o5745g0526o.356899.cm.982643.smf[XY60.hdr]                                                                           º    <       m   >I
+ !                                              Æ
+~ëFpâ<?Ÿ?¿ý€Œ
+ °ŒAh:¿û^3P4œ­5
+z_µ5G6µ z4ïuD¬þÙ¬m+Å«ÌÎ-]Ì0-°r­
+Ù{­
+M,üîDEC--WRP       NmŽ  d?"Ñî            À  ÿ(B4  A®  A¥š$            À  À  o5745g0526o.356899.cm.982643.smf[XY61.hdr]                                                                           Œ    =       n   >I !                                              Æ
+F
+ù;??;¿ýk<Ó<#r¿üž5$@ïµPè{µDÕ5$Âr4ytŽòrü­XÍR-­Ÿ-8U­°©:­±,Ø
+Àª¬t­r8ðDEC--WRP       NmŽ  ?"Ñî            À  ÿ(B4  A®  A¥š$            À  À  o5745g0526o.356899.cm.982643.smf[XY62.hdr]                                                                           œ    >       o   >I  !                                              Æ
+5ºEÍì?á?¿ÿÙ;
+ ;:ŠÄ¿ÿŒŽ»¥ŸŽvßŽÇëëŽ°ñ4bS³3:i-!$,Ko- f!-ÇÌ®
+p2­sI|®&.­|H5DEC--WRP       NmŽ  ?"Ñî            À  ÿ(B4  A®  A¥š$            À  À  o5745g0526o.356899.cm.982643.smf[XY63.hdr]                                                                           Ÿ    ?       p   >I! !                                              Æ
+(¶Ã*?`Î?k ¿ÿ»jª;ay
+¿ÿµúfŽQ
+Ç4Ç€3ìï3
+oÅ4E-.,ž@­8v¬Ž­ I«üë*,à
+è­çXrDEC--WRP       NmŽ  ?"Ñî            À  ÿ(B4  A®  A¥š$            À  À  o5745g0526o.356899.cm.982643.smf[XY64.hdr]                                                                           Ÿ    @       q   >I" !                                              Æ
+$Å¥³@?Ç?&Ç¿ÿúºc®u;å¿ÿÖ5k³ÝH4Ä\°ŽªW²ÏÚ¡4Qß­°Œ)"ÿ¶­ÿã-K+Ë<+
+ß+Wk¬éÜDEC--WRP       NmŽ  
+6?"Ñî            À  ÿ(B4  A®  A¥š$            À  À  o5745g0526o.356899.cm.982643.smf[XY65.hdr]                                                                           Ÿ    A       r   >I# !                                              Æ
+þÆ"Óê?~ß?,&¿ÿ»²
+ï»;ÝÁ¿ÿ»4<ô4Îg³qw2çLK5'ª^3jËÄ­I>Ï«Ç¿V-!w®­)¶ù­5Ô,œ
+*­RN¬šà¹DEC--WRP       NmŽ  	?"Ñî            À  ÿ(B4  A®  A¥š$            À  À  o5745g0526o.356899.cm.982643.smf[XY66.hdr]                                                                           Ÿ    B       s   >I$ !                                              ÆÓÆoy?
+oå?©$¿âŒópõŒö¿ô05
+®5 !6¶×5ê|ð5±p5ÿ:­»ÈR¬àxf­ÀÒ8­µ>G®jð÷®:z"­M£¢®¹±DEC--WRP       NmŽ  Å?"Ñî            À  ÿ(B4  A®  A¥š$            À  À  o5745g0526o.356899.cm.982643.smf[XY67.hdr]                                                                           »    C       t   >I% !                                              ÆcñSFjY?±3?
+_X¿Ý·=Å<ó=^¿áŠ6 ¿ðµ#5¶-8n5þê
+5íâµ­6S®
+'í-â.t_®b®óF."ôg-8ÝŽ­°DEC--WRP       NmŽ  Š?"Ñî            À  ÿ(B4  A®  A¥š$            À  À  o5745g0526o.356899.cm.982643.smf[XY71.hdr]                                                                           Œ    G       u   >I& !                                              Æg}ÔF
+á?
+, ?
+ ¿úv<Z";ÿ¿ÿÎ5Ëò³ÏKµ¢úÃ4}Y5%]µG÷­âÕ,\.
+üÕ,ã
+¬ð-¥^-ÇV­€þ­DEC--WRP       NmŽ  é?"Ñî            À  ÿ( B4  A®  A¥š$            À  À  o5745g0526o.356899.cm.982643.smf[XY72.hdr]                                                                           Œ    H       v   >I' !                                              ÆhèÄEí?Ÿ?>h¿ÿD;±ŒºÜ>¿ÿö5ù3¢G·Ž¶5fá4ËêŽ€'­À[è¬Oäþ-È­å^R­]x*£ÃÃ-?[¢­÷ÈÑDEC--WRP       NmŽ  ù?"Ñî            À  ÿ(!B4  A®  A¥š$            À  À  o5745g0526o.356899.cm.982643.smf[XY73.hdr]                                                                           œ    I       w   >I( !                                              ÆikÀÃ
+Œ|?å?¿þL;îËºÅ@·¿ÿí5cï@4ŽµNS®46Ü²C)5«Ä­4¬~¶p-² ¬à,³ó5­\€×­Uâ®,þDEC--WRP       NmŽ  ð?"Ñî            À  ÿ("B4  A®  A¥š$            À  À  o5745g0526o.356899.cm.982643.smf[XY74.hdr]                                                                           Ÿ     J       x   >I) !                                              ÆgKæÅ£:?
+yÅ?É¿ý­Œ
+×æ»º­Z¿þä5è¬4Ø 5^nã5^6.4š€5*¹~®
+e¬xã¿­§Š­»&­2ý­€à«Ý²Î­\«DEC--WRP       NmŽ  
+?"Ñî            À  ÿ(#B4  A®  A¥š$            À  À  o5745g0526o.356899.cm.982643.smf[XY75.hdr]                                                                           Ÿ     K       y   >I* !                                              ÆcZÆ#hÚ?{Ò?Šú¿ÛœÊ;pŽÓ¿ÿ6)éw3æG6P
+MŽÞ=@5'þ57ö£®(¬Æ× ®zOl-P­®mñ?¬ü?Z¬Þç­}·DEC--WRP       NmŽ  {?"Ñî            À  ÿ($B4  A®  A¥š$            À  À  o5745g0526o.356899.cm.982643.smf[XY76.hdr]                                                                           Œ    L       z   >I+ !                              @t×'è$Ç¿ÚèžËäÀÛN?îé8_Ú8m
+>pº?tN¿tqÚ>¢÷72
+ž5 ö7¹¡¶æžO¢é·£Ín¹ïÐ':àKºí1Qº
+æcºÓ°:ÏýDºà§º
+),DEC--DIS       N[9        d¡                                            À  À  o5748g0436o.358811.cm.982690.smf[PHU]                                                                                              {                                                        Æg9Æ3?Ñ(?
+]»?õ~ŒIþ<Îcº?êŸ¶çëµµ
+í,µñ §5ÏXµ³}.9m-;)-à`è.7KÚ«"?-±àv®ÿ-ô#IDEC--WRP       N[9  ß?(öî            À  ÿ'ÙB4  A«uA¥š$            À  À  o5748g0436o.358811.cm.982690.smf[XY01.hdr]                                                                           œ           |   {Sô !                                              ÆgŒbÅ£ÐŒ?i€?
+K?þ8»óýÎ;ô*?þ%µÍçŽÝV4ç-µbV5Cöµýð.^æ,­Äð,®Ñ-À9­Þ-Z(
+®íê.
+µbDEC--WRP       N[9  @?(öî            À  ÿ'ÚB4  A«uA¥š$            À  À  o5748g0436o.358811.cm.982690.smf[XY02.hdr]                                                                           Ÿ           }   {Sõ !                                              Æj!Ã
+Î??!?ýŒK(ºë5?ÿåŽ{*3 O5Éý4öU:3
+Ã×4`Ð!,çÖ6«žPÃ­ÿè%­$ÅK,­uRç¬óº-)JŸDEC--WRP       N[9  	¹?(öî            À  ÿ'ÛB4  A«uA¥š$            À  À  o5748g0436o.358811.cm.982690.smf[XY03.hdr]                                                                           ¿           ~   {Sö !                                              ÆiåEqu?=Á?Òœ?þ=;ï.ë:?ÿýŽOöÉ²šµ\F=ŽÈVŽ"§5,îG-ª-ÌÌú,®Ÿa-`e®,?á+Ú\Š¬Ú0DEC--WRP       N[9  î?(öî            À  ÿ'ÜB4  A«uA¥š$            À  À  o5748g0436o.358811.cm.982690.smf[XY04.hdr]                                                                           ¿              {S÷ !                                              Æf	¬F
+o?Z??ýŒ!X'Œ:nè?ûm¶
+ki4õ'\5šŽºù×Ž¡Ï3`$-."¢¬¬ò®
+óÿ-Üb-~-{W¯«d¬-uEDEC--WRP       N[9  	Š?(öî            À  ÿ'ÝB4  A«uA¥š$            À  À  o5748g0436o.358811.cm.982690.smf[XY05.hdr]                                                                           Ÿ              {Sø !                                              Æev FiŸm?{?
+|?õŒÂœ+õ?ÅU¶v¯5ûž¡5iô¶
+Ïµp?Z5²Êû.3]®	Xÿ­Y.=E.5­®Nâa­4t
+-sÃDEC--WRP       N[9  ?(öî            À  ÿ'ÞB4  A«uA¥š$            À  À  o5748g0436o.358811.cm.982690.smf[XY06.hdr]                                                                           »              {Sù !                                              ÆºÚÆpyÁ?¹?3?ó<€g<j3-?ùdµcÜìµ(±µ¬ šµc
+µ}08µ²œº-Šq"-Ÿl-Ùœ-Óü.HÄ-z6-yè¬-ÚÆÐDEC--WRP       N[9  c?(öî            À  ÿ'âB4  A«uA¥š$            À  À  o5748g0436o.358811.cm.982690.smf[XY10.hdr]                                                                           Œ    
+          {Sú !                                              Æ÷Æ"àm?ì??ÿ;­ã69ÙD?ÿÿµ
+ØŽ$µ3f4>öŽ
+»µ1]ü-@æ-ÏÒ-<ô¬Qà2-nP+²Ù+
+hy-DEC--WRP       N[9  Õ?(öî            À  ÿ'ãB4  A«uA¥š$            À  À  o5748g0436o.358811.cm.982690.smf[XY11.hdr]                                                                           Ÿ    
+          {Sû !                                              ÆDïÅ€»?¶?G?ÿÛ;
+¡2;ÿ?ÿjµo!Ž±3qíåŽßŽ
+Ñ³t-×#ê,
+X¬æñ-0±-'Ö¬ugV-ãªfmDEC--WRP       N[9  ž?(öî            À  ÿ'äB4  A«uA¥š$            À  À  o5748g0436o.358811.cm.982690.smf[XY12.hdr]                                                                           ¿    
+          {Sü !                                              ÆöÊÃ&#?é°?X?ÿ€;X,iº_Eù?ÿú4Ýø²25:ŽlÁiŽûà³'ÏŽòŸ¬qÕo«¥¹{-(¿,Êè+Át-ÍtÅ,e÷O-©¹DEC--WRP       N[9  q?(öî            À  ÿ'åB4  A«uA¥š$            À  À  o5748g0436o.358811.cm.982690.smf[XY13.hdr]                                                                           ¿    
+       
+   {Sý !                                              ÆøEïÞ?rá?Æ?ÿ³;FØQ;?ÿhŽÔŽ€ÎÀŽÆÙ4?Ôž2õM=Ž(ÀW-¡µ-$ø-V5È¬ª³­!æ,á9ª­_Ó­{ DEC--WRP       N[9  Ô?(öî            À  ÿ'æB4  A«uA¥š$            À  À  o5748g0436o.358811.cm.982690.smf[XY14.hdr]                                                                           ¿              {Sþ !                                              ÆQ
+F
+
+ù?,?L?ÿs»$º÷Â?ÿâŽä*u4-Þñ4ÒÙŽÑš(Ž$43Óñ,ðo§¬Ý!­^³«Î¢T,±T­Û>C¬Qœ­_DEC--WRP       N[9  ì?(öî            À  ÿ'çB4  A«uA¥š$            À  À  o5748g0436o.358811.cm.982690.smf[XY15.hdr]                                                                           Ÿ              {Sÿ !                                              ÆaFoT?Ù?WÈ?ÿœ»;¢Ç:³æ?ÿôµD©4Œ³üc93ÛÍŽ¡ V4nAN-Èg>­
+Ê­IyÚ­A­ýÆ­BÿR­mc.,d°ÚDEC--WRP       N[9  	"?(öî            À  ÿ'èB4  A«uA¥š$            À  À  o5748g0436o.358811.cm.982690.smf[XY16.hdr]                                                                           Ÿ              {T  !                                              ÆÖFË3?°^?
+.?ízŒÀÉôŸiG?ygÁµ£046Þ°€5ÒvÛ·.µdþ¶«oB-Œì®iíq®(õ¿/0-Ü®ß¯Â5Å­AO¯?GVDEC--WRP       N[9  ñ?(öî            À  ÿ'éB4  A«uA¥š$            À  À  o5748g0436o.358811.cm.982690.smf[XY17.hdr]                                                                           œ              {T !                                              ÅbBÆoå?*	?ä?÷q<|;*Êû?ÿËŽ®ÒâŽ^]wµ#¿Žw¹mµTH¶"R©,c£,æÀ-düÈ-
+þ,-fh_,âaÕ-oÖ7.ImMDEC--WRP       N[9  ?(öî            À  ÿ'ìB4  A«uA¥š$            À  À  o5748g0436o.358811.cm.982690.smf[XY20.hdr]                                                                           œ              {T !                                              ÅIéÆ!àV?A??õ»<þ;»n5?þîµ;_«Žw2¬µ®Y~µyšµ
+µ¡t-¹æ+Æ¢M-¹f-k×.
+è-H·Â-±z-ÈÈ@DEC--WRP       N[9  ?(öî            À  ÿ'íB4  A«uA¥š$            À  À  o5748g0436o.358811.cm.982690.smf[XY21.hdr]                                                                           Ÿ              {T !                                              ÅÞ8Å€øe?U
+?R!?ÿþ9ô"Ù;è?ÿÜŽMŽù³hö3ÃÅø.¿.2ŽŽÔ³ËBu-[&-ªµí­Y@,×ìò-€Š¬	-
+ùj,cÒzDEC--WRP       N[9  §?(öî            À  ÿ'îB4  A«uA¥š$            À  À  o5748g0436o.358811.cm.982690.smf[XY22.hdr]                                                                           Ÿ              {T !                                              Å\LÃdy?Òê?n?ÿâ:÷ {;'/
+?ÿÉŽéúŽÍã,Ž§
+ÛŽî4FBÔŽPú-,ýI-xá-Ô#Ò,£­¬Ö,Ÿ¬BX,VÎtDEC--WRP       N[9  Æ?(öî            À  ÿ'ïB4  A«uA¥š$            À  À  o5748g0436o.358811.cm.982690.smf[XY23.hdr]                                                                           ¿              {T !                                              Åj1E3>?Í?`a?ÿìºÌ':u?ÿýŽV2I4ãU³èa³'d+4ZÅž«3à«z)x­ï	!¬€¶¬úÓ­8
+£­Sz
+-MDEC--WRP       N[9  	^?(öî            À  ÿ'ðB4  A«uA¥š$            À  À  o5748g0436o.358811.cm.982690.smf[XY24.hdr]                                                                           ¿              {T !                                              ÅÊ[F
+Z?È	?ŽJ?ÿ@;ç/º¿]Ž?ÿîµ%,1o³ 2ŽÐI4¥J
+4Üb-úG¡,LG>-EL-5ÕK-î«Âm-eh-75DEC--WRP       N[9  
+$?(öî            À  ÿ'ñB4  A«uA¥š$            À  À  o5748g0436o.358811.cm.982690.smf[XY25.hdr]                                                                           Ÿ              {T !                                              ÅÔFn??µX?ÿD;
+û» 
+?ÿ:Ž¥24€k³5
+=Ž¢@4ŸÒf5T¿ ,Yaõ­nsÎ­õY«¡J-
+­)­oH0-(j-ÆeDEC--WRP       N[9  Þ?(öî            À  ÿ'òB4  A«uA¥š$            À  À  o5748g0436o.358811.cm.982690.smf[XY26.hdr]                                                                           Ÿ              {T !                                              ÅE©F)>?iý?
+~º?ÿY»ÊûŒ?O_?ûŒµ;ûm5¬5	
+ÕµšaŽM¹05â -{á5¬
+$­¶-.+Y,ó¬­·bÚ¬.ùDEC--WRP       N[9  ?(öî            À  ÿ'óB4  A«uA¥š$            À  À  o5748g0436o.358811.cm.982690.smf[XY27.hdr]                                                                           Œ              {T	 !                                              Â¹X_Æpû?,j?õ?ýü»ûµ@<×?þ
+Ž}=ŽÛ
+µE`!µ0Åô4ÑfµÝ^­-ù±ñ*N.+år
+-
+^Š-r=-ó<­Åð.
+þâDEC--WRP       N[9  ?(öî            À  ÿ'öB4  A«uA¥š$            À  À  o5748g0436o.358811.cm.982690.smf[XY30.hdr]                                                                           œ    
+          {T
+ !                                              ÂÎÆ#ä?6©?+;?þ»ýyy:ÙP(?ÿé4i³V%}58³JV«4ø°Ê³3«¡¥Ùª«­º,ÑÀ®2ÓÏ,
+­4æ+®ÿDEC--WRP       N[9  	?(öî            À  ÿ'÷B4  A«uA¥š$            À  À  o5748g0436o.358811.cm.982690.smf[XY31.hdr]                                                                           Ÿ              {T
+ !                                              ÀišáÅ¥žp?{Ò?_³?ý$<$P8|v¡?  Ž³¶³Õa=³ºŠŽª¡µ}~/²º¬à-×Cu«í
+-2Má-.òŸ­ ø-Ú .)ó¬ÃìúDEC--WRP       N[9  î?(öî            À  ÿ'øB4  A«uA¥š$            À  À  o5748g0436o.358811.cm.982690.smf[XY32.hdr]                                                                           œ               {T
+ !                                              ÂèÃ
+"
+?PŠ?;a?ÿô:ÿÆ¹bO?ÿÿ³éVº3ä³\r^3í3šŽjÃ4ie-_ 9¬ÜÝ$­uÇ­;_Í-ç+®¬ò-Ï£­ÕªØDEC--WRP       N[9  ??(öî            À  ÿ'ùB4  A«uA¥š$            À  À  o5748g0436o.358811.cm.982690.smf[XY33.hdr]                                                                           Œ    !          {T
+ !                                              Áþs³E&Æ?D?'Ü?ÿã:ó_¹ÅQ?ÿÿ4©Õ³ÃÀâŽŠ4z¯4L?ÿŽæg­šª-cŸ-.ÿ­BU­ìá¡.'xÿ-5:Ä+s{DEC--WRP       N[9  ú?(öî            À  ÿ'úB4  A«uA¥š$            À  À  o5748g0436o.358811.cm.982690.smf[XY34.hdr]                                                                           Œ    "          {T !                                              ÁÅîF
+G?WÄ?P?ÿž»>þ­ºiûÙ?ÿù³6C
+34¢Ï3ŽŸ/ŽÎV45] ,
+le«gï,',Ô+8Z0­l­Òu.
+×DEC--WRP       N[9  	;?(öî            À  ÿ'ûB4  A«uA¥š$            À  À  o5748g0436o.358811.cm.982690.smf[XY35.hdr]                                                                           Ÿ    #          {T !                                              ÂZÚeFnÔG?œü?Í°?ÿ:;
+·;
+í@?ÿÏ³ø÷c4§åŠ5$54ä
+4ñî-­±¬ü
+^,(+¬-³í-¹C-Ÿâ-k -c(ÂDEC--WRP       N[9  [?(öî            À  ÿ'üB4  A«uA¥š$            À  À  o5748g0436o.358811.cm.982690.smf[XY36.hdr]                                                                           Ÿ    $          {T !                                              ÃèZF€p?Š¢?ªÔ?ô<Iv;.Ó?ÿÄ³¢³ýò±4Âno4}5}µ	4ª¡-èa«ûà,
+¬ÆÌ-;×k,ãî-oà-
+àDEC--WRP       N[9  M?(öî            À  ÿ'ýB4  A«uA¥š$            À  À  o5748g0436o.358811.cm.982690.smf[XY37.hdr]                                                                           Ÿ    %          {T !                                              BKÜÉF21?Fæ?
+Àó¿òã<a:ÙÄ¿ÿê4=ŽP^ ²o4ö4ŸM503¶^­²Úp*ðo,ã·ý­M{À«,ïš-IÓ®!>DEC--WRP       N[9  Ç?(öî            À  ÿ( B4  A«uA¥š$            À  À  o5748g0436o.358811.cm.982690.smf[XY40.hdr]                                                                           Œ    (          {T !                                              ÂÊÂÇFoI€??Ûä¿ÿh»-ðºlÃW¿ÿù4³¶€Ž5¡ÖŽ¿Ž{ý4
+€¬þ­£¬ÈÓ -4T¬ìè­+Ì,^­0I$¬äß¹,WHDEC--WRP       N[9  e?(öî            À  ÿ(B4  A«uA¥š$            À  À  o5748g0436o.358811.cm.982690.smf[XY41.hdr]                                                                           œ    )          {T !                                              ÂDúF
+¢?u{?`¿ÿ÷ºë¹fÏv¿  4:ÍùŽ	ÄŽhÌô4xNŽš
+Ž¢œ­Ëö×-Us­
+Å*»S­DŽ§-e¿
+­Œ$­
+DEC--WRP       N[9  d?(öî            À  ÿ(B4  A«uA¥š$            À  À  o5748g0436o.358811.cm.982690.smf[XY42.hdr]                                                                           œ    *          {T !                                              Â€£E%?M?;_¿ÿÿ9Ë_º_ ÷¿ÿú3rQ(³2[Í3M-z²Äj»³I
+43{ô­#G+«@þT¬¶]p­:êh-lu­±Ö¬3	Í-ZyDEC--WRP       N[9  	á?(öî            À  ÿ(B4  A«uA¥š$            À  À  o5748g0436o.358811.cm.982690.smf[XY43.hdr]                                                                           œ    +          {T !                                              Ââ)Ã	ø?K?3¿ÿþºAÛžX°¿  2.Æ
+ŽGµ2¿ßŽPÉ2Ö¬3Qä¬¿c-Òí
+-R,{û3­,F-|h-KÕ­Ï¬DEC--WRP       N[9  ú?(öî            À  ÿ(B4  A«uA¥š$            À  À  o5748g0436o.358811.cm.982690.smf[XY44.hdr]                                                                           Œ    ,          {T !                                              Â²&NÅ€f?y<?a¿ÿ×;VÁ»x¿ÿ4$_|3Îo(4o5.ŽìO5T«Mýô­
+ò_­uk+Ó¬O×®È-
+®
+ÕDEC--WRP       N[9  ð?(öî            À  ÿ(B4  A«uA¥š$            À  À  o5748g0436o.358811.cm.982690.smf[XY45.hdr]                                                                           œ    -          {T !                                              ÃÂ>Æ#¹¬?R?îv¿ú<TÕ;¯¿ÿÕŽ£^3Á€µ4œhµ  Pµ_£Éµ.Í­!¡x¬DÞ
+.+vJ'-º®§-¹-«]¶-ÕYDEC--WRP       N[9  	m?(öî            À  ÿ(B4  A«uA¥š$            À  À  o5748g0436o.358811.cm.982690.smf[XY46.hdr]                                                                           Ÿ    .           {T !                                              ÂW>³Æp¡8?ûD?
+W¿þ»Ò2»AŽ¿ÿº1^4ñû58
+¡4b4Á.g5ô`+Û¬ßÀ
+«±pù­qx§­Šß¬@ã¬Îüs®}DEC--WRP       N[9  ?(öî            À  ÿ(B4  A«uA¥š$            À  À  o5748g0436o.358811.cm.982690.smf[XY47.hdr]                                                                           Œ    /       ¡   {T !                                              Åê	F¶Ÿ?n?ú¿ÿöºÙQ<(¿üÀ5ÕÀŽ€ÿ¬µZÎ35ºŽlí¶­&o,Ç$Ë-à­l
+/­š-úxË¬Ìs]®1âÊDEC--WRP       N[9  	?(öî            À  ÿ(
+B4  A«uA¥š$            À  À  o5748g0436o.358811.cm.982690.smf[XY50.hdr]                                                                           Œ    2       ¢   {T !                                              ÅÃFnŒ?Ä<?Ñ»¿úÐ<N
+Ô;:ºû¿ÿŒ4Ž5÷ŽŸŽ°w5c 5eV&Žý­#À,ÝÄ-
+]­xè¬éèÖ-S-©R¬¯ïDEC--WRP       N[9  	ô?(öî            À  ÿ(
+B4  A«uA¥š$            À  À  o5748g0436o.358811.cm.982690.smf[XY51.hdr]                                                                           œ    3       £   {T !                                              Å+%F
+V¢?D¡?g¿ÿ¹;?+;¡¢U¿ÿ35bWNµ
+Ì®Žøö4Äô4w¿µ(Òn­é3-Ìø-Þ­Ï¬šNà-s-*ü
+­©ãxDEC--WRP       N[9  ï?(öî            À  ÿ(
+B4  A«uA¥š$            À  À  o5748g0436o.358811.cm.982690.smf[XY52.hdr]                                                                           œ    4       €   {T
+ !                                              ÅLiEU8?/2?K¿¿  8š?Å9ŒUŠ¿ÿÿ5Y?2üìlŽKÏ3ÅMS³Œs4!pS­íÌ$¬Š»-^¢Y­Oq-
+ìí®
+t§­ÿ¬¬ó.HDEC--WRP       N[9  	à?(öî            À  ÿ(
+B4  A«uA¥š$            À  À  o5748g0436o.358811.cm.982690.smf[XY53.hdr]                                                                           ¿    5       ¥   {T
+ !                                              ÅvõÃq?þC?)š¿ÿæºçºu¢¿ÿý5$ó2¬ôD4Ãñ@Ž(R*4
+
+Žfq6­¡LÔ«máx­³]}-+Œª¬¶`F-"®¬>l-EDEC--WRP       N[9  
+Ã?(öî            À  ÿ(B4  A«uA¥š$            À  À  o5748g0436o.358811.cm.982690.smf[XY54.hdr]                                                                           ¿    6       Š   {T
+ !                                              ÅÚ=Å¥5?Fc?íj¿ÿÝ;»|8áv`¿  3oô4 ÜI±Õ³V
+ÜŽŽÄ$5S
+,Ž©¬ð_F­A%,Uâ-À©¬ª&ð-`®ÏrDEC--WRP       N[9  	?(öî            À  ÿ(B4  A«uA¥š$            À  À  o5748g0436o.358811.cm.982690.smf[XY55.hdr]                                                                           Ÿ    7       §   {T !                                              ÅpæÆ!»ê?íã?i¿¿þ_»äà»·Pî¿þÿ4ÀM3çË5|15=£^4ÁüE5¥p­ž-+ŒU¬Åú­Ôä
+­¡
+­kÈq¬Ï©5­ÏèzDEC--WRP       N[9  <?(öî            À  ÿ(B4  A«uA¥š$            À  À  o5748g0436o.358811.cm.982690.smf[XY56.hdr]                                                                           »    8       š   {T  !                                              ÅÏiÆq~?¬í?¿þª;ÎBŒ U§¿þ
+2P	4³¥4ÿüÊ5(þ>Ž¶Q5Ž_,è
+I­Ÿ­5"µ*;­5L7­Œ'¿,ÐZõ­« "DEC--WRP       N[9  ?(öî            À  ÿ(B4  A«uA¥š$            À  À  o5748g0436o.358811.cm.982690.smf[XY57.hdr]                                                                           Œ    9       ©   {T! !                                              Æ/8Fh?
+?
+Ï¿çn<Ûû<ÃD;¿î5ºUµ3	¶1ç5÷o5Ñš¶&¬ô­ì -*øá.^è2®$'­Ô
+.4-Å®<ÈDEC--WRP       N[9  P?(öî            À  ÿ(B4  A«uA¥š$            À  À  o5748g0436o.358811.cm.982690.smf[XY60.hdr]                                                                           º    <       ª   {T" !                                              Æ»
+FoÖ?l?Q¿ÿ±;Jï%»
+#¿ÿØ5$Ûx³š7ŽÐmŽ³Áb²z­	ŽhA­ÞÁ-1¬#(b-É÷­ªê-o
+M¬äT¬xQ|DEC--WRP       N[9  	
+?(öî            À  ÿ(B4  A«uA¥š$            À  À  o5748g0436o.358811.cm.982690.smf[XY61.hdr]                                                                           œ    =       «   {T# !                                              ÆõÔF
+i%?¯?÷À¿ý<g;·¿þô5}¶Ž÷¡»µt5%a3ÅicŽx­·ís-÷*-ôy­Š|­Äþ-5šÚ¬ûKý¬cÿDEC--WRP       N[9  	8?(öî            À  ÿ(B4  A«uA¥š$            À  À  o5748g0436o.358811.cm.982690.smf[XY62.hdr]                                                                           ¿    >       ¬   {T$ !                                              Æ
+àLEL·?ì?LP¿ÿœ»8oTžÔËâ¿  2è3ñ
+42D³æ
+3ž¥.ŽU§û¬UÃŸ«!­G-ÜÛ­ºÐÌ-}ß­õÎ,Õj×DEC--WRP       N[9  
+5?(öî            À  ÿ(B4  A«uA¥š$            À  À  o5748g0436o.358811.cm.982690.smf[XY63.hdr]                                                                           ¿    ?       ­   {T% !                                              Æ
+£6Ã+R?:ó?¿ÿ»_;©Û¿ÿh3qŽU4/4Á}ó4Ý&4Gv¬)¡-ÂB¬Šå­r
+­?Ø«Ïú­°$­ÜçDEC--WRP       N[9  	o?(öî            À  ÿ(B4  A«uA¥š$            À  À  o5748g0436o.358811.cm.982690.smf[XY64.hdr]                                                                           ¿    @       ®   {T& !                                              ÆÚÅ€þ?q?z¯¿ÿèºß#»SÚ¿ÿš5ôS3/ï5ët4×[bŽÐ5|Xü­åìH*
+t ¬zD¬Ý
+<®/­L--»Ð4®iDEC--WRP       N[9  
+
+?(öî            À  ÿ(B4  A«uA¥š$            À  À  o5748g0436o.358811.cm.982690.smf[XY65.hdr]                                                                           ¿    A       ¯   {T' !                                              Æ
+tÝÆ#8ñ?º?}¿üN<.T;ü¿þ5¹Öµ[ÓŽL
+Ž«ëÍµ 24Ã<Ø­U-Ri"«Òq1,Ñ).,× f,[õX-:Üe­7ÄqDEC--WRP       N[9  (?(öî            À  ÿ(B4  A«uA¥š$            À  À  o5748g0436o.358811.cm.982690.smf[XY66.hdr]                                                                           œ    B       °   {T( !                                              Æ!K°Æoò?|ÐZ?ùò¿Þ<öŒEŒd©¿úhµ1J$4ýbµ²To5ü±µOS6£^¬mì«¯.'
+å®Ïé,â*Ð­£ø|-¯É®2á.DEC--WRP       N[9  Š?(öî            À  ÿ(B4  A«uA¥š$            À  À  o5748g0436o.358811.cm.982690.smf[XY67.hdr]                                                                           ¹    C       ±   {T) !                                              ÆdÜFk£8??
+¥»¿ã<ôð<vü¿÷6>iµ€d¶
+O·5¹Œ5?µõ)­ü!Ô,¡7.Rs®ìT®­§-±?-]\®4m^DEC--WRP       N[9  Ô?(öî            À  ÿ(B4  A«uA¥š$            À  À  o5748g0436o.358811.cm.982690.smf[XY71.hdr]                                                                           º    G       ²   {T* !                                              ÆhŽ«F
+Ë? ð?pe¿ÿ¬;Pžó;
+Í¿ÿT5
+8Æ³Å#µ(	x5%T3œº]µ of­ª2+ÑÂš-ËJ;­?Æ,è®-²-5Ì­t²çDEC--WRP       N[9  
+R?(öî            À  ÿ( B4  A«uA¥š$            À  À  o5748g0436o.358811.cm.982690.smf[XY72.hdr]                                                                           ¿    H       ³   {T+ !                                              ÆjÞEÅÊ?Â×?Øe¿ÿúºa0
+Œ!/;¿üâ³/753°Û5
+ÌåŽŽeH«ü
+­#**åà­mÃ-8}š,å'
+-!¿ÿ­lRDEC--WRP       N[9  	æ?(öî            À  ÿ(!B4  A«uA¥š$            À  À  o5748g0436o.358811.cm.982690.smf[XY73.hdr]                                                                           ¿    I       Ž   {T, !                                              Æj=ÌÃ©?à?p0¿ÿøº ë9w÷¿ÿÿ4ö]²œªq3¶Ò4_ñg4\³ø3­A~+c¬­M­a©­î,Ÿ,ù
+­X|íDEC--WRP       N[9  	?(öî            À  ÿ("B4  A«uA¥š$            À  À  o5748g0436o.358811.cm.982690.smf[XY74.hdr]                                                                           À    J       µ   {T- !                                              Æi<'Å¥o,?4ý?2¿þb;é0O:8x\¿ÿü54B²$
+³p³:4<7\µi]¿4%¥­£5 +y­{°|¬Ò.
+K8¬Ž¬h-a2G­2=DEC--WRP       N[9  	%?(öî            À  ÿ(#B4  A«uA¥š$            À  À  o5748g0436o.358811.cm.982690.smf[XY75.hdr]                                                                           Ÿ    K       ¶   {T. !                                              Æb"MÆ!è;?Of? ¿á2œhÝ»?¹¿ÿF6[ÿÛ4Z26@cq4ÚGx5]å5×®W¬Ïµ®AÝ+{­ðWœ­ËÁ«­K'­»ñDEC--WRP       N[9  q?(öî            À  ÿ($B4  A«uA¥š$            À  À  o5748g0436o.358811.cm.982690.smf[XY76.hdr]                                                                           Œ    L       ·   {T/ !                              @t×#õG>¿ÚþúØìÀS<²>µö8]8d
+Ÿ`i€?y»
+¿yÍvŸ`Æ!6W·ÏžtÚ»·¡î§·Ç|Už9ÏÏµŽfb9¡	$:â·ÛºóÝ9ãê9Ú>Ý:Ð5àºæŠ9ÉDDEC--DIS       N]¯        q¡r                                            À  À  o5748g0447o.358840.cm.982715.smf[PHU]                                                                                              ž                                                        ÆeÙ
+Æ
+j?
+ÝÂ?
+~O?ú;<Zä<ÊÁg?ëÐµßWóµo&µÉã¶ûŽbMµ«é¶-ÜÈþ-N	.5Ó."=-XŽß..S
++ãa±-ªqDEC--WRP       N]¯  á?
+î            À  ÿ'ÙB4  A¬ÿÖA¥š$            À  À  o5748g0447o.358840.cm.982715.smf[XY01.hdr]                                                                           œ           ¹   žYÐ !                                              ÆeuÅ€N?r|?mõ?ý%<
+±;®?ÿ¶fŽÐZ~µ.ž+ŽóžŽâDoµLÚT./mò,ÝYj--`Á-«i-¶--ÏößDEC--WRP       N]¯  Ó?
+î            À  ÿ'ÚB4  A¬ÿÖA¥š$            À  À  o5748g0447o.358840.cm.982715.smf[XY02.hdr]                                                                           Ÿ           º   žYÑ !                                              ÆifÂÈ¬Ù?^?
+?ÿ¿»6E;Ï	?þ¯Ž?ŽÑú34
+ú2þšp2ë7:3ñÁ,ž1 -
+8¬à0·,|
+¬j­ÂèÁ,KÄã.$íDEC--WRP       N]¯  	­?
+î            À  ÿ'ÛB4  A¬ÿÖA¥š$            À  À  o5748g0447o.358840.cm.982715.smf[XY03.hdr]                                                                           Ÿ           »   žYÒ !                                              Æh`ET?H?
+?ÿ»l?;»I?þçµ¯UŽÀX4¹ ×µ^³Ž¢Ÿ5 £Ê-¿mS-?­
+Ï-¥Ü-l_
+­
+¯ ,Õ-ùÁDEC--WRP       N]¯  Ñ?
+î            À  ÿ'ÜB4  A¬ÿÖA¥š$            À  À  o5748g0447o.358840.cm.982715.smf[XY04.hdr]                                                                           Ÿ           Œ   žYÓ !                                              Æg€
+F
+xÀ?jw?Š$?ÿ©»VcÚ;€J?ÿ'µ­Ïµö>5|É$ŽþÚ41mø5n-¿¥Ï-4&í®
+A-H9:«®lÉ­8
+Î,©±<.%ºtDEC--WRP       N]¯  	z?
+î            À  ÿ'ÝB4  A¬ÿÖA¥š$            À  À  o5748g0447o.358840.cm.982715.smf[XY05.hdr]                                                                           Ÿ           œ   žYÔ !                                              ÆfËFkL?Ý
+?Ž?îŒ¹CCŒ¡
+.?óÑµgX5 
+5û¶v9µ£¬þ5ð*+-¡vó¬S[­ª3r.)7-ë_®>Êý­ÁÓ(.)ÜDEC--WRP       N]¯  z?
+î            À  ÿ'ÞB4  A¬ÿÖA¥š$            À  À  o5748g0447o.358840.cm.982715.smf[XY06.hdr]                                                                           ¹           Ÿ   žYÕ !                                              Æ
+Æi¶?Êc?Jò?@ÿ=Ø<úÍ7?äÞµ\ [µÙÏµùíß¶	i¶h¶ 9-nM-R!-Ï).;Ã<.3Ö.ù.nØÁ.êDEC--WRP       N]¯  ?
+î            À  ÿ'âB4  A¬ÿÖA¥š$            À  À  o5748g0447o.358840.cm.982715.smf[XY10.hdr]                                                                           œ    
+       ¿   žYÖ !                                              Æ«¢Æ!å3?9?÷?þ©;ÏñS;?M?ÿºµZÌŽ³ŽôšŽ`æŽøTµµ¬ä
+-°BA-#áx,úx¬ßa+.{-ýÐ-ULu-ó|ìDEC--WRP       N]¯  Í?
+î            À  ÿ'ãB4  A¬ÿÖA¥š$            À  À  o5748g0447o.358840.cm.982715.smf[XY11.hdr]                                                                           Ÿ    
+       À   žY× !                                              Æ0Å€R?XÁ?åF?ÿÇ;+9;
+?ÿ=µ4/ÚŽà*Žn=2&·Ž®µ-mœ- m-%·¬T,ç~s-_	O­<·,²ñù.ÔýDEC--WRP       N]¯  è?
+î            À  ÿ'äB4  A¬ÿÖA¥š$            À  À  o5748g0447o.358840.cm.982715.smf[XY12.hdr]                                                                           Ÿ    
+       Á   žYØ !                                              Æ
+
+Ãš?f\?Ž1?ÿó:€[=º]ãª?ÿú4öcõ³¶Ùk3Ô(Ž°÷M³3%µ@ñ­LYa,Z'«%?¿,®;®)H
+ö-Ž-J,Š.ËÌDEC--WRP       N]¯  	8?
+î            À  ÿ'åB4  A¬ÿÖA¥š$            À  À  o5748g0447o.358840.cm.982715.smf[XY13.hdr]                                                                           ¿    
+       Â   žYÙ !                                              ÆøçE¿d? ,?W?ÿä:îY«:
+?ÿý²Â q³
+ÅKŽ³ÌÅ³o3%44eãü,	ìñ+iÌ6-h#Y,zÁ­+²+ÅT-,gè-×ÍæDEC--WRP       N]¯  a?
+î            À  ÿ'æB4  A¬ÿÖA¥š$            À  À  o5748g0447o.358840.cm.982715.smf[XY14.hdr]                                                                           ¿           Ã   žYÚ !                                              Æ5öF
+!ã?N£?Õ
+?ÿµ»B»w2¡?ÿµ\ê4CÛ5£¥µ
+K3¹ä5Ü,òwà¬g­·u§,~%k¬
+{®	`,ç²-ãZDEC--WRP       N]¯  Ð?
+î            À  ÿ'çB4  A¬ÿÖA¥š$            À  À  o5748g0447o.358840.cm.982715.smf[XY15.hdr]                                                                           Ÿ           Ä   žYÛ !                                              ÆâFnÖì?[x?8b?ÿ}»ÃšºWÓ?ÿõŽ~ñ/4
+Ó³f
+Ž(É
+ŽÏô5œ-RÚ$ªšÿÊ-Mð·-kß-VÉ¹,¡Ë­
+)-ÐDEC--WRP       N]¯  	"?
+î            À  ÿ'èB4  A¬ÿÖA¥š$            À  À  o5748g0447o.358840.cm.982715.smf[XY16.hdr]                                                                           œ           Å   žYÜ !                                              ÆÊ=FŠfœ?|.
+?aàð?ö)Œ}³<¯@?ó4Ïéµ{{¶/é5Î¶ÀÒ·
+Éô«¥.Ä
+-£	ù/pD®C/
+F®
+ß¯
+DEC--WRP       N]¯  
+?
+î            À  ÿ'éB4  A¬ÿÖA¥š$            À  À  o5748g0447o.358840.cm.982715.smf[XY17.hdr]                                                                           »           Æ   žYÝ !                                              ÅìHÆoJ
+?©¥?^e?ö]<
+[;V¥?ÿM±ìz3}!4øuÿµ:ãµó*¶$>;,¢
+ä,*
+ë¬žCh¬Ñ¿­1hx-ÃÈ-Ï.>üDEC--WRP       N]¯  #?
+î            À  ÿ'ìB4  A¬ÿÖA¥š$            À  À  o5748g0447o.358840.cm.982715.smf[XY20.hdr]                                                                           œ           Ç   žYÞ !                                              Å¡ãÆ!°V?Åù?*9?ÿÂ»0h9;Ç
+G?þÑµIðŽ»už4oòÂŽÿŒ1Ä*]µvo. ê,þúM¬.T-
+±š­ÈY-9,0ûé-ŸÇ<DEC--WRP       N]¯  W?
+î            À  ÿ'íB4  A¬ÿÖA¥š$            À  À  o5748g0447o.358840.cm.982715.smf[XY21.hdr]                                                                           Ÿ           È   žYß !                                              Å[ÕÅ€T?Ïš?\?ÿöºŸ	;¥É?ÿÑŽÍÙ³ÛÅëŽÚCWŽ¶f3
+XûµVk€-L`Œ,ŒB@-EÎQ+«Õd-ZÖ--Å¬¢=°-ûVoDEC--WRP       N]¯  	O?
+î            À  ÿ'îB4  A¬ÿÖA¥š$            À  À  o5748g0447o.358840.cm.982715.smf[XY22.hdr]                                                                           Ÿ           É   žYà !                                              Å	Ã
+?ð'?:1?  9Æ:\§?ÿúµ$ŽP(3ÿn4'yY4@zØ4·{-¶_-I;ñ­"7Ô­!\*DH­¥®
+­qDEC--WRP       N]¯  	L?
+î            À  ÿ'ïB4  A¬ÿÖA¥š$            À  À  o5748g0447o.358840.cm.982715.smf[XY23.hdr]                                                                           Ÿ           Ê   žYá !                                              ÅõÃEYa?õ"?R?ÿëºÎHº
+ï?ÿýµ"é3é
+ 4h­_³@²iA43}w-­?Ñ¬
+ÍÌ­j_ª¬'ü,§I§,(b-V(ùDEC--WRP       N]¯  	?
+î            À  ÿ'ðB4  A¬ÿÖA¥š$            À  À  o5748g0447o.358840.cm.982715.smf[XY24.hdr]                                                                           Ÿ           Ë   žYâ !                                              Å¥ÓF
+p)?G?Õ?ÿ;m%ö»bû<?ÿŽ[±í4Àe4' bŽO4]ª4o*j~­»­­0­
+r·¬ãNù­ŒZ5-9ÆŠE
+DEC--WRP       N]¯  	?
+î            À  ÿ'ñB4  A¬ÿÖA¥š$            À  À  o5748g0447o.358840.cm.982715.smf[XY25.hdr]                                                                           œ           Ì   žYã !                                              ÅÖµFo<?ç{?â?ýŒ
+
+ï»¬
+W?ÿŽÁ31v04íÞµ+¡ÀµCÆmŽ×®+¥n¬5;O­Æ«K²,Ê­ëÌ°­¡5­W&óDEC--WRP       N]¯  	?
+î            À  ÿ'òB4  A¬ÿÖA¥š$            À  À  o5748g0447o.358840.cm.982715.smf[XY26.hdr]                                                                           œ           Í   žYä !                                              ÅÓFíZ?A§?ðÀ?÷ÆŒ"T»±á?ÿŽ¿fÈ3økã58Lµ>UHµBê«5³},ÂpÖ,úÌ­4-t¢b-u
+¶­+µ­[0-Ë
+mDEC--WRP       N]¯  X?
+î            À  ÿ'óB4  A¬ÿÖA¥š$            À  À  o5748g0447o.358840.cm.982715.smf[XY27.hdr]                                                                           Œ           Î   žYå !                                              ÂÆÿÆrØ?âf?EÉ?üŒ16»ÉÃ?ÿP4îËQ3{Q(µ5e5#zW5mµ#M­4­d­H
+,[
+-¯¯@­ÝÃ­=
+2-·o{DEC--WRP       N]¯  	?
+î            À  ÿ'öB4  A¬ÿÖA¥š$            À  À  o5748g0447o.358840.cm.982715.smf[XY30.hdr]                                                                           Ÿ    
+       Ï   žYæ !                                              ÂõPÆ"Ÿ?n?g?ûÆŒ:Í;à?ÿÒµT3µ~àµBj*²¹/5RÍ§ŽT-, šÅ.Â².è-ó¬ÚÑ³­®Yâ,üSDEC--WRP       N]¯  ·?
+î            À  ÿ'÷B4  A¬ÿÖA¥š$            À  À  o5748g0447o.358840.cm.982715.smf[XY31.hdr]                                                                           Ÿ           Ð   žYç !                                              >ÓùÅ¥Ê?lA?,
+?þœ;Ê?º?ÿõ³
+4(ÿŽÅ€ŽOÎ1µ0Nµ^),åçT¬ñÛ¬Ñ­šÖ
+-©Å-ÖV-¢. {iDEC--WRP       N]¯  œ?
+î            À  ÿ'øB4  A¬ÿÖA¥š$            À  À  o5748g0447o.358840.cm.982715.smf[XY32.hdr]                                                                           Ÿ            Ñ   žYè !                                              ÁÁó
+Ãp?;1?NÉ?ÿú:\Š&º!?ÿþ3ôÅ3¡Ž%4$m?³ÀsŽ×±úP,­p»õ­ú}"-«ÕÐw¬)Óv-éŽ+ÞÃµDEC--WRP       N]¯  ?
+î            À  ÿ'ùB4  A¬ÿÖA¥š$            À  À  o5748g0447o.358840.cm.982715.smf[XY33.hdr]                                                                           Œ    !       Ò   žYé !                                              Á·EY?/þ?<?ÿî:œIIº [?ÿý4j¯Ž Žµ
+õ3Àôê4	Õ2rÁ­?0-¹9.0eªÌb­ÿí«-ô¬L-0ÖDEC--WRP       N]¯  	À?
+î            À  ÿ'úB4  A¬ÿÖA¥š$            À  À  o5748g0447o.358840.cm.982715.smf[XY34.hdr]                                                                           œ    "       Ó   žYê !                                              Á(©%F
+gµ?v?@Á?ÿ»ªw®žþv?  ³G²<çh4Æ@K³*A¹µ¹
+5ip
+,L.,€ßk,¬ ¬ 'Ð-¶C«åM5­É»2.ïDEC--WRP       N]¯  	Æ?
+î            À  ÿ'ûB4  A¬ÿÖA¥š$            À  À  o5748g0447o.358840.cm.982715.smf[XY35.hdr]                                                                           œ    #       Ô   žYë !                                              ÂÎrFp.q?€<?~°Ã?ÿø:±ë:öé?ÿýŽÃØh3õž4*4RL3 9RµW)-Íá,æì©­œ-2/ì,C+,×ª<5\­ï++DEC--WRP       N]¯  	@?
+î            À  ÿ'üB4  A¬ÿÖA¥š$            À  À  o5748g0447o.358840.cm.982715.smf[XY36.hdr]                                                                           Ÿ    $       Õ   žYì !                                              AsFÃ?#Œ?
+?ýŒ
+¬Ìº¿€Z?ÿîŽjŽNIM³òÏŽAÅJµ4ý-M$ô-s Å¬®a¬LL¬h(³¬ûi­'$ð-	+æDEC--WRP       N]¯  =?
+î            À  ÿ'ýB4  A¬ÿÖA¥š$            À  À  o5748g0447o.358840.cm.982715.smf[XY37.hdr]                                                                           œ    %       Ö   žYí !                                              ÂFšñ? ?\¡¿ýò;þÛ;±¹¿ÿ³
+²Ž	ŽÈw²5*74Îœµœùî­Â­)­
+UC­È­I-,ý{n­ô³ìDEC--WRP       N]¯  ¥?
+î            À  ÿ( B4  A¬ÿÖA¥š$            À  À  o5748g0447o.358840.cm.982715.smf[XY40.hdr]                                                                           œ    (       ×   žYî !                                              ÁÊàFoU?·j?ô¿ö0<ù9º±6:¿ÿð4÷ó«4ŽèŽÎZýŽfÛ5¿¡:4£a]«±u ¬¿â.!6
+-,¬î£­#4.$Kh,ëÚIDEC--WRP       N]¯  ÷?
+î            À  ÿ(B4  A¬ÿÖA¥š$            À  À  o5748g0447o.358840.cm.982715.smf[XY41.hdr]                                                                           œ    )       Ø   žYï !                                              Â¯
+ÄF
+zÙ?õã?Çì¿ÿôº¬ºd&×¿ÿú³³³.bm5J²3±ÓªŽgP Žåû­dÂÓ,7aÛ­äÃÐ*Ï°K.RKù,š@b¬9LJ­TFûDEC--WRP       N]¯  ¢?
+î            À  ÿ(B4  A¬ÿÖA¥š$            À  À  o5748g0447o.358840.cm.982715.smf[XY42.hdr]                                                                           Ÿ    *       Ù   žYð !                                              Â¯÷EO?_¬?=
+¿ÿü::Ü¶ºQÐJ¿ÿû3ûM3}Vó07ÄªŽGuôŽí4Q­.Æ(¬çMä«äÝY-nµR-
+ª®
+^®
+}h-¶®:DEC--WRP       N]¯  	p?
+î            À  ÿ(B4  A¬ÿÖA¥š$            À  À  o5748g0447o.358840.cm.982715.smf[XY43.hdr]                                                                           Œ    +       Ú   žYñ !                                              Â­2;Ãã?J?Aú¿ÿþ:&G9L¿ÿÿ²O³û^Â3Ì"çŽ%HŽ2ñœ2ñ@d¬¢
+?-OöZ-4ö-§/­Îúv.õX.	Àà­6€LDEC--WRP       N]¯  	?
+î            À  ÿ(B4  A¬ÿÖA¥š$            À  À  o5748g0447o.358840.cm.982715.smf[XY44.hdr]                                                                           Œ    ,       Û   žYò !                                              ÂÇK Å€qt?mî?¯x¿ÿÖ;/(»
+E¿ÿÐ4
+~Ì4ãÒ3úr±4»í§³¹'ò5§±¬#Ì²¬à<â­P§b¬æ3,07m­Š*+Rþ*®BGŸDEC--WRP       N]¯  
+v?
+î            À  ÿ(B4  A¬ÿÖA¥š$            À  À  o5748g0447o.358840.cm.982715.smf[XY45.hdr]                                                                           œ    -       Ü   žYó !                                              Â°zÄÆ$
+?Ðô?~ü·¿ÿÎ»!>d:¢Ïs¿ÿó³÷ê³à:ÖµÀ¥ŽÙ[54Ÿí#µî
+,þR/¬¡(-Ã×-s°Ù-¹_-}à­(Ž-ÖDEC--WRP       N]¯  	¶?
+î            À  ÿ(B4  A¬ÿÖA¥š$            À  À  o5748g0447o.358840.cm.982715.smf[XY46.hdr]                                                                           œ    .       Ý   žYô !                                              ÂÇtÆpÇ?€?8p¿  ¹;8c:ªÁ¿ÿö4~ß4§0F4iâŽ]ú3©ùP6
+Õ­rÝÿ¬åïí¬áH­
+pç¬-ž«Ëú®1¬øDEC--WRP       N]¯  
+?
+î            À  ÿ(B4  A¬ÿÖA¥š$            À  À  o5748g0447o.358840.cm.982715.smf[XY47.hdr]                                                                           Œ    /       Þ   žYõ !                                              Å||F€?AQ?
+ò¿  7ãa»#Ô¿ÿÎ4æ247uµ
+c3©i³ÑuZµéx*­À~P­wôu¬ï€­+­€n+Æ¬:®-DEC--WRP       N]¯  =?
+î            À  ÿ(
+B4  A¬ÿÖA¥š$            À  À  o5748g0447o.358840.cm.982715.smf[XY50.hdr]                                                                           œ    2       ß   žYö !                                              Å«YFn5±?>?K¿ÿÒ;Ú;®S¿ÿu³ŽÌŽz1Žë-4ý·2)ÅµG6-^--X-[¿¬ÙŸå­^-üª«Ðap­EDEC--WRP       N]¯  	Û?
+î            À  ÿ(
+B4  A¬ÿÖA¥š$            À  À  o5748g0447o.358840.cm.982715.smf[XY51.hdr]                                                                           œ    3       à   žY÷ !                                              Å»òF
+pM?jL?Þ¿þÁ;É4:Æ"¿ÿô2é
+¯Íª\ŽÀ>Í4ùÞ:5#GŽón<,µ«!,|G¬Z·ø­¶ÕÌ.G-¡Î­1[DEC--WRP       N]¯  À?
+î            À  ÿ(
+B4  A¬ÿÖA¥š$            À  À  o5748g0447o.358840.cm.982715.smf[XY52.hdr]                                                                           œ    4       á   žYø !                                              ÅíkE-V?p?rq¿ÿà:þ;^:
+¿ÿý3cà²Ê·;µXD3ÏNÝ²®À(ŽmÖ-Ù+t .!»?+±.í-r
+-y_ôªÆ]­2DEC--WRP       N]¯  »?
+î            À  ÿ(
+B4  A¬ÿÖA¥š$            À  À  o5748g0447o.358840.cm.982715.smf[XY53.hdr]                                                                           Ÿ    5       â   žYù !                                              ÅÇmÃ
+!f?ù¯?cµ¿  ¹^lbºØÎ¿ÿé5]4Y4vÖ636¯3ŽÑä4wº¬­üÇ­
+
+­š
+(,zS¡-á7 ­1*È­vÀÎDEC--WRP       N]¯  	÷?
+î            À  ÿ(B4  A¬ÿÖA¥š$            À  À  o5748g0447o.358840.cm.982715.smf[XY54.hdr]                                                                           ¿    6       ã   žYú !                                              ÅÛÅ€ïo?
+G?RZ¿ÿº;;»
+¿ÿÙ4êàÇ4Ž¢eê4œŽNø²5'"­W­>
+v­j°­*>ð.$¬þF «'º¡®
+FRDEC--WRP       N]¯  	Ò?
+î            À  ÿ(B4  A¬ÿÖA¥š$            À  À  o5748g0447o.358840.cm.982715.smf[XY55.hdr]                                                                           ¿    7       ä   žYû !                                              Å
+YÆ!QÚ?
+Î?ÖÇ¿ÿ»sÀë»!á¿ÿÏ4*Ü4s®ü5kó4wpÚ3ÊnÞ6	Õ\­°@w­
+Tý-šMU¬Õ'®>XÝ¬Ñx,šÅ¿®_YDEC--WRP       N]¯  	%?
+î            À  ÿ(B4  A¬ÿÖA¥š$            À  À  o5748g0447o.358840.cm.982715.smf[XY56.hdr]                                                                           Œ    8       å   žYü !                                              Å
+Æoì?;÷?
+ö¿þ[»âpŒuË
+¿øü5,o5
+¥µ4¿ç>54ör5ßT­n®P­#¶q­€ýé­«u¬F$ÿ­ß-­Öã® >ýDEC--WRP       N]¯  	o?
+î            À  ÿ(B4  A¬ÿÖA¥š$            À  À  o5748g0447o.358840.cm.982715.smf[XY57.hdr]                                                                           œ    9       æ   žYý !                                              ÆµFÇ(?©?{â¿ës<ÈÆç<Ã¿öâ5taèµ[Ýµ€5¯t­5³
+¶;&­
+.Š-/Âf-îÒq­ý÷­(à-áYI-¯žx®òDEC--WRP       N]¯  È?
+î            À  ÿ(B4  A¬ÿÖA¥š$            À  À  o5748g0447o.358840.cm.982715.smf[XY60.hdr]                                                                           Œ    <       ç   žYþ !                                              ÆúéFnBr?€0?¿ÿö:N;Uð¿ÿ§5B<\Ž¥m^µ lš4®;ªŽ<Wµ9{­ÆÌ,Ãõ-&Ó­&SF¬gG3-0í¬þÑ­ÚCDEC--WRP       N]¯  ~?
+î            À  ÿ(B4  A¬ÿÖA¥š$            À  À  o5748g0447o.358840.cm.982715.smf[XY61.hdr]                                                                           Œ    =       è   žYÿ !                                              ÆIFbþ?J?¿ù<iQ»e{»¿ÿ5qþ32ótµ5³õ}u5`]5
+?­Ê¿«æA-ý`
+¬.Å­¿zP­g-0
+-hæ_DEC--WRP       N]¯  ×?
+î            À  ÿ(B4  A¬ÿÖA¥š$            À  À  o5748g0447o.358840.cm.982715.smf[XY62.hdr]                                                                           Ÿ    >       é   žZ  !                                              Æ
+æE]I?~}ô?¿ÿû:NðZº·¥¡¿ÿðµ ÞÝ48(Žª	wŽ"²že²ìI.
+PË¬xÂs-w?Ó-qÙ-
+«,9±,©s,,æDEC--WRP       N]¯  	?
+î            À  ÿ(B4  A¬ÿÖA¥š$            À  À  o5748g0447o.358840.cm.982715.smf[XY63.hdr]                                                                           Ÿ    ?       ê   žZ !                                              Æ
+úœÃ#*ì?ï©?¿ÿÿ¹>
+:À¡è¿ÿî³Ç³'0ÉŽTlG4Ä¹Æ4«¬(3°K÷+ÈÄn+X-F6­Ç­{-=y¬3­Æ"ºDEC--WRP       N]¯  	d?
+î            À  ÿ(B4  A¬ÿÖA¥š$            À  À  o5748g0447o.358840.cm.982715.smf[XY64.hdr]                                                                           ¿    @       ë   žZ !                                              Æ
+ÎÅ¥N?å?_m¿ÿß;w; õ¿ÿà4vØü³lÏ+³WüŽöcýŽ@f4ò¿Ï¬ÓÄF«ÈÃª+žTõ-e»l,|'-$
+ï-9^á­¶ DEC--WRP       N]¯  
+M?
+î            À  ÿ(B4  A¬ÿÖA¥š$            À  À  o5748g0447o.358840.cm.982715.smf[XY65.hdr]                                                                           ¿    A       ì   žZ !                                              Æ
+nÆ"?õ?¹I¿ÿ¥;XzŸ»F
+t¿ÿ³5£óW4{5z2¬Ï£³«m3ºk5e­÷ÂÄ¬åº+­utC¬`Û-¿+|¬Â
+Ë­öbâDEC--WRP       N]¯  	 ?
+î            À  ÿ(B4  A¬ÿÖA¥š$            À  À  o5748g0447o.358840.cm.982715.smf[XY66.hdr]                                                                           ¿    B       í   žZ !                                              ÆwRÆmNA???ë¿Üÿœ OYŒ¯J[¿ò64k5,55àèm5èŽ85º^l65t8,/f8¬¹ìâ­íŸl®ï|®
+]®~­°A³®EóDEC--WRP       N]¯  ä?
+î            À  ÿ(B4  A¬ÿÖA¥š$            À  À  o5748g0447o.358840.cm.982715.smf[XY67.hdr]                                                                           º    C       î   žZ !                                              Æg}Fma.?
+Ñ?L¿òù<¥8,<;x¿ýÀ5ÄŽ·7
+µ€J5E
+ù5
+ûµ8­æÉè,³0×-žÄ_­Eº­ÞÊ-'-Â­ß"ôDEC--WRP       N]¯  u?
+î            À  ÿ(B4  A¬ÿÖA¥š$            À  À  o5748g0447o.358840.cm.982715.smf[XY71.hdr]                                                                           »    G       ï   žZ !                                              ÆfF
+#?mÜ?¯
+¿û<NýÙ;0þÌ¿ÿ¿6	M3âuµ»æ5`š
+5R·rµ;P®
+
+z¬³-ÂÅ­ŸÏ­w`v,ùÉ-À`k­88DEC--WRP       N]¯  	
+?
+î            À  ÿ( B4  A¬ÿÖA¥š$            À  À  o5748g0447o.358840.cm.982715.smf[XY72.hdr]                                                                           œ    H       ð   žZ !                                              Æh~+EÌv?Hâ?ñ¿ÿé:ÜØ:
+É¿ÿþ5Œ
+þ³€~+²jrê4j4ÔÂŽ§ç­ô'Þ+DûªÙhm¬Ø
+Y¬œÑ,Žö-·Ð­ÒÙéDEC--WRP       N]¯  	?
+î            À  ÿ(!B4  A¬ÿÖA¥š$            À  À  o5748g0447o.358840.cm.982715.smf[XY73.hdr]                                                                           Œ    I       ñ   žZ !                                              ÆjŠÁÃí0? ?YB¿ÿÿ9pI8Ï€s¿  3jïO2§X@³Æ­3
+44+p¬SC«Jh,Oµâ« IŠ­PÝN¬ÿ-dr­}ùÿDEC--WRP       N]¯  	à?
+î            À  ÿ("B4  A¬ÿÖA¥š$            À  À  o5748g0447o.358840.cm.982715.smf[XY74.hdr]                                                                           Ÿ    J       ò   žZ	 !                                              Æj
+÷Å£è?ÁÄ?8¿ÿx»Å»žþè¿þú4š®4TŸ£4¯nß5õ4sï5N:â­
+2¬
+è&¬¢Ý­Œot­oã­Æ`³,ôÕ­DEC--WRP       N]¯  Ó?
+î            À  ÿ(#B4  A¬ÿÖA¥š$            À  À  o5748g0447o.358840.cm.982715.smf[XY75.hdr]                                                                           ¿    K       ó   žZ
+ !                                              Æf
+ÇÆ!Éç?r?-¿÷µŒ_ŒVš¿ùï5Ûìò5eÑ6K{3ŽìÁ5 .Q­æ­»åö®©'{-1ðÑ­Ê@­Óf-¡ßK¬çþ-DEC--WRP       N]¯  Æ?
+î            À  ÿ($B4  A¬ÿÖA¥š$            À  À  o5748g0447o.358840.cm.982715.smf[XY76.hdr]                                                                           œ    L       ô   žZ
+ !                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
Index: trunk/Ohana/src/relphot/src/GridOps.c
===================================================================
--- trunk/Ohana/src/relphot/src/GridOps.c	(revision 39455)
+++ trunk/Ohana/src/relphot/src/GridOps.c	(revision 39457)
@@ -38,4 +38,6 @@
 
 void initGrid (int dX, int dY) {
+  OHANA_UNUSED_PARAM(dX);
+  OHANA_UNUSED_PARAM(dY);
 
   int i, N, ccdnum_max, refX, refY, refBin;
Index: trunk/Ohana/src/relphot/src/ImageOps.c
===================================================================
--- trunk/Ohana/src/relphot/src/ImageOps.c	(revision 39455)
+++ trunk/Ohana/src/relphot/src/ImageOps.c	(revision 39457)
@@ -413,4 +413,6 @@
 // NOTE: static flat-field component is included in measure.Mflat
 float getMcal (off_t meas, int cat, FlatCorrectionTable *flatcorr, Catalog *catalog) {
+  OHANA_UNUSED_PARAM(flatcorr);
+  OHANA_UNUSED_PARAM(catalog);
 
   off_t i;
@@ -437,4 +439,7 @@
 // NOTE: static flat-field component is included in measure.Mflat
 float getMcal_alt (off_t meas, int cat, FlatCorrectionTable *flatcorr, float Xccd, float Yccd) {
+  OHANA_UNUSED_PARAM(flatcorr);
+  OHANA_UNUSED_PARAM(Xccd);
+  OHANA_UNUSED_PARAM(Yccd);
 
   off_t i;
@@ -562,4 +567,5 @@
 
 float getMflat (off_t meas, int cat, FlatCorrectionTable *flatcorr, Catalog *catalog) {
+  OHANA_UNUSED_PARAM(flatcorr);
 
   off_t i = MeasureToImage[cat][meas];
@@ -842,4 +848,6 @@
 static int setMcal_init_done = FALSE;
 void plot_setMcal (double *list, int Npts, StatType *stats, float clouds) {
+  OHANA_UNUSED_PARAM(stats);
+  OHANA_UNUSED_PARAM(clouds);
 
   off_t i;
@@ -1023,4 +1031,5 @@
 
 StatType statsImageX (Catalog *catalog) {
+  OHANA_UNUSED_PARAM(catalog);
 
   off_t i, n;
@@ -1055,4 +1064,5 @@
 
 StatType statsImageM (Catalog *catalog) {
+  OHANA_UNUSED_PARAM(catalog);
 
   off_t i, n;
@@ -1087,4 +1097,5 @@
 
 StatType statsImagedM (Catalog *catalog) {
+  OHANA_UNUSED_PARAM(catalog);
 
   off_t i, n;
Index: trunk/Ohana/src/relphot/src/MosaicOps.c
===================================================================
--- trunk/Ohana/src/relphot/src/MosaicOps.c	(revision 39455)
+++ trunk/Ohana/src/relphot/src/MosaicOps.c	(revision 39457)
@@ -501,4 +501,5 @@
 
 void setMosaicCenters (Image *image, off_t Nimage) {
+  OHANA_UNUSED_PARAM(Nimage);
 
   /* find max dR, dD range for all mosaics */
@@ -596,4 +597,5 @@
 
 void initMosaicGrid (Image *image, off_t Nimage) {
+  OHANA_UNUSED_PARAM(Nimage);
 
   /* find max dR, dD range for all mosaics */
@@ -1580,4 +1582,5 @@
 
 StatType statsMosaicM (Catalog *catalog) {
+  OHANA_UNUSED_PARAM(catalog);
 
   off_t i;
@@ -1612,4 +1615,5 @@
 
 StatType statsMosaicdM (Catalog *catalog) {
+  OHANA_UNUSED_PARAM(catalog);
 
   off_t i, n;
@@ -1692,4 +1696,5 @@
 
 StatType statsMosaicX (Catalog *catalog) {
+  OHANA_UNUSED_PARAM(catalog);
 
   off_t i, n;
Index: trunk/Ohana/src/relphot/src/StarOps.c
===================================================================
--- trunk/Ohana/src/relphot/src/StarOps.c	(revision 39455)
+++ trunk/Ohana/src/relphot/src/StarOps.c	(revision 39457)
@@ -443,4 +443,10 @@
 // NOTE: here 'catalog' is a pointer to a specific catalog, not the root of the array
 int setMrel_catalog (Catalog *catalog, int Nc, int pass, FlatCorrectionTable *flatcorr, SetMrelInfo *results, int Nsecfilt) {
+  OHANA_UNUSED_PARAM(catalog);
+  OHANA_UNUSED_PARAM(Nc);
+  OHANA_UNUSED_PARAM(pass);
+  OHANA_UNUSED_PARAM(flatcorr);
+  OHANA_UNUSED_PARAM(results);
+  OHANA_UNUSED_PARAM(Nsecfilt);
 
   fprintf (stderr, "??? should you still be using the old version of setMrel_catalog??\n");
Index: trunk/Ohana/src/relphot/src/plotstuff.c
===================================================================
--- trunk/Ohana/src/relphot/src/plotstuff.c	(revision 39455)
+++ trunk/Ohana/src/relphot/src/plotstuff.c	(revision 39457)
@@ -52,4 +52,5 @@
 
 void JpegPlot (Graphdata *graphmode, int N, char *filename) {
+  OHANA_UNUSED_PARAM(graphmode);
 
   if (Xgraph[N] == 0) return;
@@ -60,4 +61,5 @@
 
 void PSPlot (Graphdata *graphmode, int N, char *filename) {
+  OHANA_UNUSED_PARAM(graphmode);
 
   if (Xgraph[N] == 0) return;
@@ -93,4 +95,5 @@
 
 void PlotVector (int Npts, double *vect, int mode, int N, char *type) {
+  OHANA_UNUSED_PARAM(mode);
 
   float *values;
Index: trunk/Ohana/src/relphot/src/setMrelCatalog.c
===================================================================
--- trunk/Ohana/src/relphot/src/setMrelCatalog.c	(revision 39455)
+++ trunk/Ohana/src/relphot/src/setMrelCatalog.c	(revision 39457)
@@ -719,4 +719,5 @@
 // analysis is done on flux, not mags (as the faintest objects will be nearly insignificant)
 int setMrelAverageForcedWarp (Catalog *catalog, int cat, off_t ave, int Nsecfilt, FlatCorrectionTable *flatcorr, SetMrelInfo *results) {
+  OHANA_UNUSED_PARAM(flatcorr);
 
   // we are guaranteed to have average, measure, secfilt
Index: trunk/Ohana/src/relphot/src/share_mean_mags.c
===================================================================
--- trunk/Ohana/src/relphot/src/share_mean_mags.c	(revision 39455)
+++ trunk/Ohana/src/relphot/src/share_mean_mags.c	(revision 39457)
@@ -64,4 +64,5 @@
 
 int slurp_mean_mags (Catalog *catalog, int Ncatalog, RegionHostTable *regionHosts, int nloop) {
+  OHANA_UNUSED_PARAM(Ncatalog);
 
   off_t i;
Index: trunk/Ohana/src/relphot/src/synthetic_mags.c
===================================================================
--- trunk/Ohana/src/relphot/src/synthetic_mags.c	(revision 39455)
+++ trunk/Ohana/src/relphot/src/synthetic_mags.c	(revision 39457)
@@ -18,4 +18,5 @@
 
 int add_synthetic_mags (AverageTiny *average, SecFilt *secfilt, MeasureTiny *measure, off_t *Nmeasure, off_t *Nm) {
+  OHANA_UNUSED_PARAM(average);
 
   if (!SyntheticPhotometry) return TRUE;
Index: trunk/Ohana/src/skycalc/src/astro.c
===================================================================
--- trunk/Ohana/src/skycalc/src/astro.c	(revision 39455)
+++ trunk/Ohana/src/skycalc/src/astro.c	(revision 39457)
@@ -1,3 +1,4 @@
 # include <skycalc_internal.h>
+# define UNUSED_PARAM(x)(void)(x)
 
 /* Takes a coordinate pair and precesses it using matrix procedures
@@ -104,4 +105,5 @@
    equatorial (all assumed of date.) */
 void SC_eclrot(double jd, double *x, double *y, double *z) {
+  UNUSED_PARAM(x);
 
   double incl;
@@ -112,30 +114,30 @@
 
   incl = (23.439291 + T * (-0.0130042 - 0.00000016 * T))/DEG_IN_RADIAN;
-  /* 1992 Astron Almanac, p. B18, dropping the
-     cubic term, which is 2 milli-arcsec! */
+/* 1992 Astron Almanac, p. B18, dropping the
+   cubic term, which is 2 milli-arcsec! */
   ypr = cos(incl) * *y - sin(incl) * *z;
   zpr = sin(incl) * *y + cos(incl) * *z;
   *y = ypr;
   *z = zpr;
-  /* x remains the same. */
+/* x remains the same. */
 }
 
 /* Given a julian date in 1900-2100, returns the correction
-     delta t which is:
-     TDT - UT (after 1983 and before 1993)
-     ET - UT (before 1983)
-     an extrapolated guess  (after 1993).
+   delta t which is:
+   TDT - UT (after 1983 and before 1993)
+   ET - UT (before 1983)
+   an extrapolated guess  (after 1993).
 
-     For dates in the past (<= 1993) the value is linearly
-     interpolated on 5-year intervals; for dates after the present,
-     an extrapolation is used, because the true value of delta t
-     cannot be predicted precisely.  Note that TDT is essentially the
-     modern version of ephemeris time with a slightly cleaner
-     definition.
+   For dates in the past (<= 1993) the value is linearly
+   interpolated on 5-year intervals; for dates after the present,
+   an extrapolation is used, because the true value of delta t
+   cannot be predicted precisely.  Note that TDT is essentially the
+   modern version of ephemeris time with a slightly cleaner
+   definition.
 
-     Where the algorithm shifts there is an approximately 0.1 second
-     discontinuity.  Also, the 5-year linear interpolation scheme can
-     lead to errors as large as 0.5 seconds in some cases, though
-     usually rather smaller. */
+   Where the algorithm shifts there is an approximately 0.1 second
+   discontinuity.  Also, the 5-year linear interpolation scheme can
+   lead to errors as large as 0.5 seconds in some cases, though
+   usually rather smaller. */
 
 double SC_etcorr (double jd) {
Index: trunk/Ohana/src/tools/src/list_astro.c
===================================================================
--- trunk/Ohana/src/tools/src/list_astro.c	(revision 39455)
+++ trunk/Ohana/src/tools/src/list_astro.c	(revision 39457)
@@ -2,4 +2,5 @@
 
 int main (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argv);
 
   float *ra1, *ra2, *dec1, *dec2;
Index: trunk/Ohana/src/uniphot/src/update_catalog_setphot.c
===================================================================
--- trunk/Ohana/src/uniphot/src/update_catalog_setphot.c	(revision 39455)
+++ trunk/Ohana/src/uniphot/src/update_catalog_setphot.c	(revision 39457)
@@ -2,4 +2,5 @@
 
 void update_catalog_setphot (Catalog *catalog, Image *image, off_t *index, off_t Nimage, CamPhotomCorrection *camcorr) {
+  OHANA_UNUSED_PARAM(Nimage);
 
   off_t i, found;
Index: trunk/Ohana/src/uniphot/src/update_catalog_setposangle.c
===================================================================
--- trunk/Ohana/src/uniphot/src/update_catalog_setposangle.c	(revision 39455)
+++ trunk/Ohana/src/uniphot/src/update_catalog_setposangle.c	(revision 39457)
@@ -2,4 +2,5 @@
 
 void update_catalog_setposangle (Catalog *catalog, ImageSubset *image, off_t *index, off_t Nimage) {
+  OHANA_UNUSED_PARAM(Nimage);
 
   float posAngle, pltScale;
