Index: /branches/eam_branches/ipp-20130509/Ohana/src/libfits/header/F_init_H.c
===================================================================
--- /branches/eam_branches/ipp-20130509/Ohana/src/libfits/header/F_init_H.c	(revision 35693)
+++ /branches/eam_branches/ipp-20130509/Ohana/src/libfits/header/F_init_H.c	(revision 35694)
@@ -18,6 +18,6 @@
   header[0].Naxes  = 0;
   header[0].buffer = NULL;
-  for (i = 0; i < FT_MAX_NAXES; i++)
-    header[0].Naxis[i] = 0;
+  for (i = 0; i < FT_MAX_NAXES; i++) header[0].Naxis[i] = 0;
+  header[0].datasize = 0;
 
   return (TRUE);
Index: /branches/eam_branches/ipp-20130509/Ohana/src/libfits/include/gfitsio.h
===================================================================
--- /branches/eam_branches/ipp-20130509/Ohana/src/libfits/include/gfitsio.h	(revision 35693)
+++ /branches/eam_branches/ipp-20130509/Ohana/src/libfits/include/gfitsio.h	(revision 35694)
@@ -140,4 +140,5 @@
 /******************************* Matrix functions *************/
 
+int     gfits_init_matrix              PROTO((Matrix *matrix));
 void   	gfits_add_matrix_value         PROTO((Matrix *matrix, off_t x, off_t y, double value)); 
 int    	gfits_convert_format           PROTO((Header *header, Matrix *matrix, int outBitpix, double outScale, double outZero, int inBlank, int outUnsign));
@@ -168,4 +169,7 @@
 
 /******************************* Table functions *************/
+
+int     gfits_init_table  	       PROTO((FTable *table));
+int     gfits_init_vtable 	       PROTO((VTable *table));
 
 char   *gfits_table_print              PROTO((FTable *ftable,...));
Index: /branches/eam_branches/ipp-20130509/Ohana/src/libfits/matrix/F_create_M.c
===================================================================
--- /branches/eam_branches/ipp-20130509/Ohana/src/libfits/matrix/F_create_M.c	(revision 35693)
+++ /branches/eam_branches/ipp-20130509/Ohana/src/libfits/matrix/F_create_M.c	(revision 35694)
@@ -25,3 +25,21 @@
 }
 
+/*********************** fits create matrix *******************************/
+int gfits_init_matrix (Matrix *matrix) {
+
+  int i;
+
+  matrix[0].bitpix = 8;
+  matrix[0].unsign = FALSE;
+  matrix[0].bscale = 1.0;
+  matrix[0].bzero  = 0.0;
+  matrix[0].Naxes  = 0;
+  for (i = 0; i < FT_MAX_NAXES; i++) matrix[0].Naxis[i] = 0;
+
+  matrix[0].buffer = NULL;
+  matrix[0].datasize = 0;
+  return (TRUE);
+
+}
+
 // XXX free buffer if non-null: need to double check for existing frees
Index: /branches/eam_branches/ipp-20130509/Ohana/src/libfits/table/F_create_T.c
===================================================================
--- /branches/eam_branches/ipp-20130509/Ohana/src/libfits/table/F_create_T.c	(revision 35693)
+++ /branches/eam_branches/ipp-20130509/Ohana/src/libfits/table/F_create_T.c	(revision 35694)
@@ -1,4 +1,26 @@
 # include <ohana.h>
 # include <gfitsio.h>
+
+/*********************** fits init table *******************************/
+int gfits_init_table (FTable *table) {
+  table[0].header = NULL;
+  table[0].buffer = NULL;
+  table[0].datasize = 0;
+  table[0].validsize = 0;
+  return (TRUE);
+
+}
+
+/*********************** fits init table *******************************/
+int gfits_init_vtable (VTable *table) {
+
+  table[0].header   = NULL;
+  table[0].buffer   = NULL;
+  table[0].row      = NULL;
+  table[0].Nrow     = 0;
+  table[0].datasize = 0;
+  table[0].pad      = 0;
+  return (TRUE);
+}
 
 /*********************** fits create table *******************************/
