Index: branches/ipp-magic-v0/Ohana/src/libfits/doc/ChangeLog.txt
===================================================================
--- branches/ipp-magic-v0/Ohana/src/libfits/doc/ChangeLog.txt	(revision 21062)
+++ branches/ipp-magic-v0/Ohana/src/libfits/doc/ChangeLog.txt	(revision 21062)
@@ -0,0 +1,41 @@
+
+- libfits 1.6 : 2006.08.23
+  * in order to allow compliation with cfitsio programs, I have changed the 
+    entire namespace to 'gfits' from 'fits'  (actually, only fits_copy_header 
+    was conflicting, but it is better to have a sufficiently different namespace).  
+    All ohana programs need to migrate to the new version of libfits.
+  * set buffer to NULL in gfits_init_header 
+
+- libfits 1.5
+  * cleaned up signed/unsigned inconsistencies
+
+libfits-1-4:
+  added dependency on libohana
+  make libfits work with ohana_allocate
+  removed internal fits.h include file, 
+  replaced with the common fitsio.h file
+
+2005.10.07
+
+	I was having some memory collision problems, and attempting to
+	use the ohana_allocate functions reminded me that the libFITS
+	functions were not supported under ohana_allocate.  This was
+	unhelpful.  I bit the bullet and split libohana into libohana
+	(base functions only, including ohana_allocate) and libdvo
+	(functions based on the libautocode structures).  Doing this
+	allowed me to make libFITS depend on libohana (including
+	ohana_allocate).  BUT, this forced me to change all LDFLAGS
+	entries in ohana to swap -lohana -lFITS for -lFITS -lohana,
+	and to add include <fitsio.h> in some cases.
+
+libfits-1-3:
+ added some additional vtable support, fixed minor iterpretation errors
+ in fits_modify.  
+
+libfits-1-1: 
+
+  F_scan now skips leading ' before parsing value : some bad FITS
+  writers add ' to float entries!
+
+libfits-1-0:
+  imported to CVS
Index: branches/ipp-magic-v0/Ohana/src/libfits/doc/VERSIONS
===================================================================
--- branches/ipp-magic-v0/Ohana/src/libfits/doc/VERSIONS	(revision 21062)
+++ branches/ipp-magic-v0/Ohana/src/libfits/doc/VERSIONS	(revision 21062)
@@ -0,0 +1,5 @@
+
+tag names used by libfits:
+
+TAG         : Comment
+libfits-1-0 : first version under CVS
Index: branches/ipp-magic-v0/Ohana/src/libfits/doc/notes-compress.txt
===================================================================
--- branches/ipp-magic-v0/Ohana/src/libfits/doc/notes-compress.txt	(revision 21062)
+++ branches/ipp-magic-v0/Ohana/src/libfits/doc/notes-compress.txt	(revision 21062)
@@ -0,0 +1,54 @@
+
+TFORMn : rPt(e_max)
+r is 0, 1, or absent
+P is literal
+t is datatype character for binary tables
+e_max is the largest record in the column
+
+data column actually contains: 2 32bit values:
+Length + Offset
+
+THEAP : offset from start of data to start of heap
+(note that the heap starts at NAXIS1 x NAXIS2, not Nx2880 bytes). 
+
+total size of heap segment (gap + heap data) is PCOUNT
+
+I need to implement (at least) support for read of compressed images.
+It might be a good plan to upgrade the gfits API set, or at least
+identify needed work.
+
+* PCOUNT / GCOUNT : these are currently ignored.  I need to at least
+  include them in the calculation of the fits data segment size.  I
+  might need to use them in the interpretation of the table data.
+
+* implement variable-length columns in FITS table support.  
+
+* add the I/O support directly to gfits_read/write_matrix, or define
+  low-level APIs to support read/write of a compressed image?
+
+  * we should start with the low-level APIs and add in the higher
+    level ones as needed.
+
+* possible needed APIs & upgrades:
+
+  - gfits_image_is_compressed (Header *header) 
+    does the specified header correspond to a compressed image?	
+    what about the PHU which implies a compressed image in the next
+    HDU?
+
+  - Matrix *gfits_uncompress_image (Header *header, Table *table)
+    convert the specified table into an image, modifying the header in
+    place
+
+  - Table *gfits_compress_image (Header *header, Matrix *matrix, Compression *options)
+    compress the given image returning the table data
+
+  o include PCOUNT in data area size (gfits_matrix_size)
+
+  o read heap when reading table (gfits_fread_table_data)
+
+  - void *gfits_varlength_column_pointer (FTable *ftable, VarLengthColumn *column, int row);
+
+  o int gfits_varlength_column_define (FTable *ftable, VarLengthColumn *def, int column);
+
+
Index: branches/ipp-magic-v0/Ohana/src/libfits/doc/sample.c
===================================================================
--- branches/elixir/Ohana/src/libfits/doc/sample.c	(revision 2414)
+++ branches/ipp-magic-v0/Ohana/src/libfits/doc/sample.c	(revision 21062)
@@ -1,3 +1,4 @@
-# include "fitsio.h"
+# include <ohana.h>
+# include <gfitsio.h>
 # define TRUE 1
 
@@ -24,49 +25,49 @@
 
   /* create primary header */
-  fits_init_header (&header);    header.extend = TRUE;
-  fits_create_header (&header);
-  fits_create_matrix (&header, &matrix);
-  fits_print (&header, "NEXTEND", "%d", 1, 2);
+  gfits_init_header (&header);    header.extend = TRUE;
+  gfits_create_header (&header);
+  gfits_create_matrix (&header, &matrix);
+  gfits_print (&header, "NEXTEND", "%d", 1, 2);
 
   /* define bintable header & layout */
-  fits_create_table_header (&theader1, "BINTABLE", "ZERO_POINTS");
+  gfits_create_table_header (&theader1, "BINTABLE", "ZERO_POINTS");
 
-  fits_define_bintable_column (&theader1, "E", "ZP_OBS", "measured zero point", "mag", 1.0, 0.0);
-  fits_define_bintable_column (&theader1, "E", "ZP_REF", "measured zero point", "mag", 1.0, 0.0);
-  fits_define_bintable_column (&theader1, "J", "TIME",   "time of data", "seconds since Jan 1, 1970 UT", 1.0, 0.0);
-  fits_define_bintable_column (&theader1, "8A", "TCHAR",   "time of data", "seconds since Jan 1, 1970 UT", 1.0, 0.0);
+  gfits_define_bintable_column (&theader1, "E", "ZP_OBS", "measured zero point", "mag", 1.0, 0.0);
+  gfits_define_bintable_column (&theader1, "E", "ZP_REF", "measured zero point", "mag", 1.0, 0.0);
+  gfits_define_bintable_column (&theader1, "J", "TIME",   "time of data", "seconds since Jan 1, 1970 UT", 1.0, 0.0);
+  gfits_define_bintable_column (&theader1, "8A", "TCHAR",   "time of data", "seconds since Jan 1, 1970 UT", 1.0, 0.0);
 
   /* create table, add data values */
-  fits_create_table (&theader1, &table1);
+  gfits_create_table (&theader1, &table1);
 
   /* set table column based on array, extend NAXIS2 as needed/appropriate */
-  fits_set_bintable_column (&theader1, &table1, "ZP_OBS", zpobs, Nrow);
-  fits_set_bintable_column (&theader1, &table1, "ZP_REF", zpref, Nrow);
-  fits_set_bintable_column (&theader1, &table1, "TIME",   time,  Nrow);
-  fits_set_bintable_column (&theader1, &table1, "TCHAR",  tchar,  Nrow);
+  gfits_set_bintable_column (&theader1, &table1, "ZP_OBS", zpobs, Nrow);
+  gfits_set_bintable_column (&theader1, &table1, "ZP_REF", zpref, Nrow);
+  gfits_set_bintable_column (&theader1, &table1, "TIME",   time,  Nrow);
+  gfits_set_bintable_column (&theader1, &table1, "TCHAR",  tchar,  Nrow);
 
   /* define ASCII table header */
-  fits_create_table_header (&theader2, "TABLE", "ASCII_PTS");
+  gfits_create_table_header (&theader2, "TABLE", "ASCII_PTS");
 
-  fits_define_table_column (&theader2, "F5.2", "ZP_OBS", "measured zero point", "mag");
-  fits_define_table_column (&theader2, "F5.2", "ZP_REF", "measured zero point", "mag");
-  fits_define_table_column (&theader2, "I8", "TIME",    "time of data", "seconds");
-  fits_define_table_column (&theader2, "A8", "TCHAR",   "time of data", "YYYYMMDD");
+  gfits_define_table_column (&theader2, "F5.2", "ZP_OBS", "measured zero point", "mag");
+  gfits_define_table_column (&theader2, "F5.2", "ZP_REF", "measured zero point", "mag");
+  gfits_define_table_column (&theader2, "I8", "TIME",    "time of data", "seconds");
+  gfits_define_table_column (&theader2, "A8", "TCHAR",   "time of data", "YYYYMMDD");
 
   /* create table, add data values */
-  fits_create_table (&theader2, &table2);
+  gfits_create_table (&theader2, &table2);
 
-  fits_set_table_column (&theader2, &table2, "ZP_OBS", zpobs, Nrow);
-  fits_set_table_column (&theader2, &table2, "ZP_REF", zpref, Nrow);
-  fits_set_table_column (&theader2, &table2, "TIME",   time,  Nrow);
-  fits_set_table_column (&theader2, &table2, "TCHAR",  tchar, Nrow);
+  gfits_set_table_column (&theader2, &table2, "ZP_OBS", zpobs, Nrow);
+  gfits_set_table_column (&theader2, &table2, "ZP_REF", zpref, Nrow);
+  gfits_set_table_column (&theader2, &table2, "TIME",   time,  Nrow);
+  gfits_set_table_column (&theader2, &table2, "TCHAR",  tchar, Nrow);
 
   /* write header, matrix, table1, table2 */
-  fits_write_header  (filename, &header);
-  fits_write_matrix  (filename, &matrix);
-  fits_write_Theader (filename, &theader1);
-  fits_write_table   (filename, &table1);
-  fits_write_Theader (filename, &theader2);
-  fits_write_table   (filename, &table2);
+  gfits_write_header  (filename, &header);
+  gfits_write_matrix  (filename, &matrix);
+  gfits_write_Theader (filename, &theader1);
+  gfits_write_table   (filename, &table1);
+  gfits_write_Theader (filename, &theader2);
+  gfits_write_table   (filename, &table2);
 
 }
Index: branches/ipp-magic-v0/Ohana/src/libfits/doc/sample2.c
===================================================================
--- branches/elixir/Ohana/src/libfits/doc/sample2.c	(revision 2414)
+++ branches/ipp-magic-v0/Ohana/src/libfits/doc/sample2.c	(revision 21062)
@@ -1,3 +1,4 @@
-# include "fitsio.h"
+# include <ohana.h>
+# include <gfitsio.h>
 # include <stdio.h>
 # define TRUE 1
@@ -18,15 +19,15 @@
 
   strcpy (filename, "test.fits");
-  fits_read_header  (filename, &header);
-  fits_read_matrix  (filename, &matrix);
-  fits_read_ftable  (filename, &table1, "ZERO_POINTS");
-  fits_read_ftable  (filename, &table2, "ASCII_PTS");
+  gfits_read_header  (filename, &header);
+  gfits_read_matrix  (filename, &matrix);
+  gfits_read_ftable  (filename, &table1, "ZERO_POINTS");
+  gfits_read_ftable  (filename, &table2, "ASCII_PTS");
   
   /* set table column based on array, extend NAXIS2 as needed/appropriate */
-  fits_get_bintable_column (&theader1, &table1, "ZP_OBS", &zpobs);
-  fits_get_bintable_column (&theader1, &table1, "ZP_REF", &zpref);
-  fits_get_bintable_column (&theader1, &table1, "TIME",   &time);
-  fits_get_bintable_column (&theader1, &table1, "TCHAR",  &tchar);
-  fits_scan (&theader1, "NAXIS2", "%d", 1, &Nrow);
+  gfits_get_bintable_column (&theader1, &table1, "ZP_OBS", &zpobs);
+  gfits_get_bintable_column (&theader1, &table1, "ZP_REF", &zpref);
+  gfits_get_bintable_column (&theader1, &table1, "TIME",   &time);
+  gfits_get_bintable_column (&theader1, &table1, "TCHAR",  &tchar);
+  gfits_scan (&theader1, "NAXIS2", "%d", 1, &Nrow);
 
   for (i = 0; i < Nrow; i++) {
@@ -37,9 +38,9 @@
 
   /* set table column based on array, extend NAXIS2 as needed/appropriate */
-  fits_get_table_column (&theader2, &table2, "ZP_OBS", &zpobs);
-  fits_get_table_column (&theader2, &table2, "ZP_REF", &zpref);
-  fits_get_table_column (&theader2, &table2, "TIME",   &time);
-  fits_get_table_column (&theader2, &table2, "TCHAR",  &tchar);
-  fits_scan (&theader2, "NAXIS2", "%d", 1, &Nrow);
+  gfits_get_table_column (&theader2, &table2, "ZP_OBS", &zpobs);
+  gfits_get_table_column (&theader2, &table2, "ZP_REF", &zpref);
+  gfits_get_table_column (&theader2, &table2, "TIME",   &time);
+  gfits_get_table_column (&theader2, &table2, "TCHAR",  &tchar);
+  gfits_scan (&theader2, "NAXIS2", "%d", 1, &Nrow);
 
   for (i = 0; i < Nrow; i++) {
@@ -53,7 +54,7 @@
 
 /*
-  fits_set_table_column (&theader2, &table2, "ZP_OBS", zpobs, Nrow);
-  fits_set_table_column (&theader2, &table2, "ZP_REF", zpref, Nrow);
-  fits_set_table_column (&theader2, &table2, "TIME",   time,  Nrow);
-  fits_set_table_column (&theader2, &table2, "TCHAR",  tchar, Nrow);
+  gfits_set_table_column (&theader2, &table2, "ZP_OBS", zpobs, Nrow);
+  gfits_set_table_column (&theader2, &table2, "ZP_REF", zpref, Nrow);
+  gfits_set_table_column (&theader2, &table2, "TIME",   time,  Nrow);
+  gfits_set_table_column (&theader2, &table2, "TCHAR",  tchar, Nrow);
 */
