Index: trunk/Ohana/src/libfits/header/F_convert_H.c
===================================================================
--- trunk/Ohana/src/libfits/header/F_convert_H.c	(revision 41739)
+++ trunk/Ohana/src/libfits/header/F_convert_H.c	(revision 42389)
@@ -11,5 +11,5 @@
   Ns = strlen (line);
   No = 80 - Ns;
-  strncpy (header->buffer, line, Ns);
+  strncpy_nowarn (header->buffer, line, Ns);
   memset (&header->buffer[Ns], ' ', No);
 
@@ -27,5 +27,5 @@
   Ns = strlen (line);
   No = 80 - Ns;
-  strncpy (header->buffer, line, Ns);
+  strncpy_nowarn (header->buffer, line, Ns);
   memset (&header->buffer[Ns], ' ', No);
 
@@ -46,5 +46,5 @@
   Ns = strlen (line);
   No = 80 - Ns;
-  strncpy (header->buffer, line, Ns);
+  strncpy_nowarn (header->buffer, line, Ns);
   memset (&header->buffer[Ns], ' ', No);
 
Index: trunk/Ohana/src/libfits/header/F_create_H.c
===================================================================
--- trunk/Ohana/src/libfits/header/F_create_H.c	(revision 41739)
+++ trunk/Ohana/src/libfits/header/F_create_H.c	(revision 42389)
@@ -12,8 +12,10 @@
 
   ALLOCATE (header[0].buffer, char, NBYTES);
+  bzero (header[0].buffer, NBYTES);
 
-  for (i = 0; i < NBYTES; i++) 
-    header[0].buffer[i] = ' ';
-  strncpy (header[0].buffer, "END", 3);
+  for (i = 0; i < NBYTES; i++) header[0].buffer[i] = ' ';
+  header[0].buffer[0] = 'E';
+  header[0].buffer[1] = 'N';
+  header[0].buffer[2] = 'D';
 
   gfits_modify_alt (header, "SIMPLE", "%t", 1, header[0].simple);
@@ -22,5 +24,5 @@
 				       
   for (i = 0; i < header[0].Naxes; i++) {
-    snprintf (axis, 10, "NAXIS%d", i + 1);
+    snprintf_nowarn (axis, 10, "NAXIS%d", i + 1);
     gfits_modify (header,  axis, OFF_T_FMT, 1,  header[0].Naxis[i]);
   }
Index: trunk/Ohana/src/libfits/header/F_modify.c
===================================================================
--- trunk/Ohana/src/libfits/header/F_modify.c	(revision 41739)
+++ trunk/Ohana/src/libfits/header/F_modify.c	(revision 42389)
@@ -8,5 +8,7 @@
   /* this function is extremely similar to gfits_print, except it allows for changing an existing field. */
 
-  char comment[82], string[82], data[82];
+  // the output string needs to be long enough to keep the compiler from
+  // complaining, even though the string cannot be more than 80 chars
+  char comment[82], string[200], data[82];
   char *p, *qe;
   va_list argp;
@@ -14,5 +16,5 @@
   va_start (argp, N);
   bzero (data, 82);
-  bzero (string, 82);
+  bzero (string, 200);
   bzero (comment, 82);
 
@@ -46,25 +48,25 @@
     qe += 3;
     qe = MIN (p + 80, qe);
-    strncpy (comment, qe, p + 80 - qe);
+    strncpy_nowarn (comment, qe, p + 80 - qe);
   }
   gfits_pad_ending (comment, 0x20, 82);  /* comment must contain spaces to the end */
 
   /* write the numeric modes */
-  if (!strcmp (mode, "%d"))   { snprintf (string, 81, "%-8s= %20d / %-s ",    field, va_arg (argp, int),       	      	comment); goto found_it; }
-  if (!strcmp (mode, "%ld"))  { snprintf (string, 81, "%-8s= %20ld / %-s ",   field, va_arg (argp, long),      	      	comment); goto found_it; }
-  if (!strcmp (mode, "%lld")) { snprintf (string, 81, "%-8s= %20lld / %-s ",  field, va_arg (argp, long long), 	      	comment); goto found_it; }
-  if (!strcmp (mode, "%Ld"))  { snprintf (string, 81, "%-8s= %20lld / %-s ",  field, va_arg (argp, long long), 	      	comment); goto found_it; }
-  if (!strcmp (mode, "%u"))   { snprintf (string, 81, "%-8s= %20u / %-s ",    field, va_arg (argp, unsigned),  	      	comment); goto found_it; }
-  if (!strcmp (mode, "%lu"))  { snprintf (string, 81, "%-8s= %20lu / %-s ",   field, va_arg (argp, unsigned long),      comment); goto found_it; }
-  if (!strcmp (mode, "%llu")) { snprintf (string, 81, "%-8s= %20llu / %-s ",  field, va_arg (argp, unsigned long long), comment); goto found_it; }
-  if (!strcmp (mode, "%Lu"))  { snprintf (string, 81, "%-8s= %20llu / %-s ",  field, va_arg (argp, unsigned long long), comment); goto found_it; }
-  if (!strcmp (mode, "%hd"))  { snprintf (string, 81, "%-8s= %20d / %-s ",    field, va_arg (argp, int),      	        comment); goto found_it; } 
-  if (!strcmp (mode, "%f"))   { snprintf (string, 81, "%-8s= %20.10f / %-s ", field, va_arg (argp, double),   	        comment); goto found_it; } 
-  if (!strcmp (mode, "%lf"))  { snprintf (string, 81, "%-8s= %20.10f / %-s ", field, va_arg (argp, double),   	        comment); goto found_it; } 
-  if (!strcmp (mode, "%e"))   { snprintf (string, 81, "%-8s= %20.10E / %-s ", field, va_arg (argp, double),   	        comment); goto found_it; } 
-  if (!strcmp (mode, "%le"))  { snprintf (string, 81, "%-8s= %20.10E / %-s ", field, va_arg (argp, double),   	        comment); goto found_it; } 
-  if (!strcmp (mode, "%g"))   { snprintf (string, 81, "%-8s= %20.10G / %-s ", field, va_arg (argp, double),   	        comment); goto found_it; } 
-  if (!strcmp (mode, "%lg"))  { snprintf (string, 81, "%-8s= %20.10G / %-s ", field, va_arg (argp, double),   	        comment); goto found_it; } 
-  if (!strcmp (mode, "%jd"))  { snprintf (string, 81, "%-8s= %20jd / %-s ",   field, va_arg (argp, intmax_t), 	        comment); goto found_it; }
+  if (!strcmp (mode, "%d"))   { snprintf (string, 200, "%-8s= %20d / %-s ",    field, va_arg (argp, int),       	 comment); goto found_it; }
+  if (!strcmp (mode, "%ld"))  { snprintf (string, 200, "%-8s= %20ld / %-s ",   field, va_arg (argp, long),      	 comment); goto found_it; }
+  if (!strcmp (mode, "%lld")) { snprintf (string, 200, "%-8s= %20lld / %-s ",  field, va_arg (argp, long long), 	 comment); goto found_it; }
+  if (!strcmp (mode, "%Ld"))  { snprintf (string, 200, "%-8s= %20lld / %-s ",  field, va_arg (argp, long long), 	 comment); goto found_it; }
+  if (!strcmp (mode, "%u"))   { snprintf (string, 200, "%-8s= %20u / %-s ",    field, va_arg (argp, unsigned),  	 comment); goto found_it; }
+  if (!strcmp (mode, "%lu"))  { snprintf (string, 200, "%-8s= %20lu / %-s ",   field, va_arg (argp, unsigned long),      comment); goto found_it; }
+  if (!strcmp (mode, "%llu")) { snprintf (string, 200, "%-8s= %20llu / %-s ",  field, va_arg (argp, unsigned long long), comment); goto found_it; }
+  if (!strcmp (mode, "%Lu"))  { snprintf (string, 200, "%-8s= %20llu / %-s ",  field, va_arg (argp, unsigned long long), comment); goto found_it; }
+  if (!strcmp (mode, "%hd"))  { snprintf (string, 200, "%-8s= %20d / %-s ",    field, va_arg (argp, int),      	         comment); goto found_it; } 
+  if (!strcmp (mode, "%f"))   { snprintf (string, 200, "%-8s= %20.10f / %-s ", field, va_arg (argp, double),   	         comment); goto found_it; } 
+  if (!strcmp (mode, "%lf"))  { snprintf (string, 200, "%-8s= %20.10f / %-s ", field, va_arg (argp, double),   	         comment); goto found_it; } 
+  if (!strcmp (mode, "%e"))   { snprintf (string, 200, "%-8s= %20.10E / %-s ", field, va_arg (argp, double),   	         comment); goto found_it; } 
+  if (!strcmp (mode, "%le"))  { snprintf (string, 200, "%-8s= %20.10E / %-s ", field, va_arg (argp, double),   	         comment); goto found_it; } 
+  if (!strcmp (mode, "%g"))   { snprintf (string, 200, "%-8s= %20.10G / %-s ", field, va_arg (argp, double),   	         comment); goto found_it; } 
+  if (!strcmp (mode, "%lg"))  { snprintf (string, 200, "%-8s= %20.10G / %-s ", field, va_arg (argp, double),   	         comment); goto found_it; } 
+  if (!strcmp (mode, "%jd"))  { snprintf (string, 200, "%-8s= %20jd / %-s ",   field, va_arg (argp, intmax_t), 	         comment); goto found_it; }
 
   /* string value.  Quotes must be at least 8 chars apart */
@@ -72,6 +74,6 @@
     char *ptr = va_arg (argp, char *);
     if (!ptr) goto invalid;
-    strncpy (data, ptr, 68);
-    snprintf (string, 81, "%-8s= '%-8s' / %-s ", field, data, comment);
+    strncpy_nowarn (data, ptr, 68);
+    snprintf (string, 200, "%-8s= '%-8s' / %-s ", field, data, comment);
     goto found_it;
   }
@@ -83,5 +85,5 @@
 
 found_it:
-  strncpy (p, string, 80);
+  memcpy (p, string, 80); // do not use strncpy_nowarn: do NOT set last byte to NULL
   va_end (argp);
   return (TRUE);
@@ -94,5 +96,5 @@
   /* this function is extremely similar to gfits_print, except it allows for changing an existing field. */
 
-  char comment[82], string[82], data[82];
+  char comment[82], string[200], data[82];
   char *p, *qs, *qe;
   va_list argp;
@@ -100,6 +102,6 @@
   va_start (argp, N);
   bzero (data, 82);
-  bzero (string, 82);
   bzero (comment, 82);
+  bzero (string, 200);
 
   if (mode[0] != '%') {
@@ -132,5 +134,5 @@
     qe += 3;
     qe = MIN (p + 80, qe);
-    strncpy (comment, qe, p + 80 - qe);
+    strncpy_nowarn (comment, qe, p + 80 - qe);
   }
   gfits_pad_ending (comment, 0x20, 82);  /* comment must contain spaces to the end */
@@ -139,7 +141,7 @@
   if (!strcmp (mode, "%t")) {
     if (va_arg (argp, int)) 
-      snprintf (string, 81, "%-8s= %18s T / %-s ", field, " ", comment);
+      snprintf (string, 200, "%-8s= %18s T / %-s ", field, " ", comment);
     else
-      snprintf (string, 81, "%-8s= %18s F / %-s ", field, " ", comment);
+      snprintf (string, 200, "%-8s= %18s F / %-s ", field, " ", comment);
   }
 
@@ -148,6 +150,6 @@
     char *ptr = va_arg (argp, char *);
     if (!ptr) goto invalid;
-    strncpy (data, ptr, 71);
-    snprintf (string, 81, "%-8s %-71s", field, data);
+    strncpy_nowarn (data, ptr, 71);
+    snprintf (string, 200, "%-8s %-71s", field, data);
   }  
 
@@ -161,15 +163,15 @@
     if (qs[-1] == 0x27) qs --;
 
-    strncpy (data, qs, MAX (MIN (qe - qs, 71), 0));
+    strncpy_nowarn (data, qs, MAX (MIN (qe - qs, 71), 0));
 
     char *ptr = va_arg (argp, char *);
     if (!ptr) goto invalid;
-    strncpy (comment, ptr, 80);
+    strncpy_nowarn (comment, ptr, 80);
     gfits_pad_ending (comment, 0x20, 82);  /* comment must contain spaces to the end */
-    snprintf (string, 81, "%-8s= %s / %-s", field, data, comment);
+    snprintf (string, 200, "%-8s= %s / %-s", field, data, comment);
     /* this will keep the original line, but truncate the comment */
   }
 
-  strncpy (p, string, 80);
+  memcpy (p, string, 80); // do not use strncpy_nowarn: do NOT set last byte to NULL
   va_end (argp);
   return (TRUE);
Index: trunk/Ohana/src/libfits/header/F_print.c
===================================================================
--- trunk/Ohana/src/libfits/header/F_print.c	(revision 41739)
+++ trunk/Ohana/src/libfits/header/F_print.c	(revision 42389)
@@ -8,5 +8,5 @@
 
   static char blank[] = " ";
-  char string[82], line[80];
+  char string[200], line[80];
   char *p;
   va_list argp;  
@@ -46,20 +46,20 @@
 
   /* write the numeric modes */
-  if (!strcmp (mode, "%d"))  { snprintf (string, 81, "%-8s= %20d / %46s ",    field, va_arg (argp, int),                blank); goto found_it; }
-  if (!strcmp (mode, "%ld")) { snprintf (string, 81, "%-8s= %20ld / %46s ",   field, va_arg (argp, long),               blank); goto found_it; }
-  if (!strcmp (mode, "%lld")){ snprintf (string, 81, "%-8s= %20lld / %46s ",  field, va_arg (argp, long long),          blank); goto found_it; }
-  if (!strcmp (mode, "%Ld")) { snprintf (string, 81, "%-8s= %20lld / %46s ",  field, va_arg (argp, long long),          blank); goto found_it; }
-  if (!strcmp (mode, "%u"))  { snprintf (string, 81, "%-8s= %20u / %46s ",    field, va_arg (argp, unsigned),           blank); goto found_it; }
-  if (!strcmp (mode, "%lu")) { snprintf (string, 81, "%-8s= %20lu / %46s ",   field, va_arg (argp, unsigned long),      blank); goto found_it; }
-  if (!strcmp (mode, "%llu")){ snprintf (string, 81, "%-8s= %20llu / %46s ",  field, va_arg (argp, unsigned long long), blank); goto found_it; }
-  if (!strcmp (mode, "%Lu")) { snprintf (string, 81, "%-8s= %20llu / %46s ",  field, va_arg (argp, unsigned long long), blank); goto found_it; }
-  if (!strcmp (mode, "%hd")) { snprintf (string, 81, "%-8s= %20d / %46s ",    field, va_arg (argp, int),                blank); goto found_it; }
-  if (!strcmp (mode, "%f"))  { snprintf (string, 81, "%-8s= %20.10f / %46s ", field, va_arg (argp, double),             blank); goto found_it; }
-  if (!strcmp (mode, "%lf")) { snprintf (string, 81, "%-8s= %20.10f / %46s ", field, va_arg (argp, double),             blank); goto found_it; }
-  if (!strcmp (mode, "%e"))  { snprintf (string, 81, "%-8s= %20.10E / %46s ", field, va_arg (argp, double),             blank); goto found_it; }
-  if (!strcmp (mode, "%le")) { snprintf (string, 81, "%-8s= %20.10E / %46s ", field, va_arg (argp, double),             blank); goto found_it; }
-  if (!strcmp (mode, "%g"))  { snprintf (string, 81, "%-8s= %20.10G / %46s ", field, va_arg (argp, double),             blank); goto found_it; }
-  if (!strcmp (mode, "%lg")) { snprintf (string, 81, "%-8s= %20.10G / %46s ", field, va_arg (argp, double),             blank); goto found_it; }
-  if (!strcmp (mode, "%jd")) { snprintf (string, 81, "%-8s= %20jd / %46s ",   field, va_arg (argp, intmax_t),           blank); goto found_it; }
+  if (!strcmp (mode, "%d"))  { snprintf (string, 200, "%-8s= %20d / %46s ",    field, va_arg (argp, int),                blank); goto found_it; }
+  if (!strcmp (mode, "%ld")) { snprintf (string, 200, "%-8s= %20ld / %46s ",   field, va_arg (argp, long),               blank); goto found_it; }
+  if (!strcmp (mode, "%lld")){ snprintf (string, 200, "%-8s= %20lld / %46s ",  field, va_arg (argp, long long),          blank); goto found_it; }
+  if (!strcmp (mode, "%Ld")) { snprintf (string, 200, "%-8s= %20lld / %46s ",  field, va_arg (argp, long long),          blank); goto found_it; }
+  if (!strcmp (mode, "%u"))  { snprintf (string, 200, "%-8s= %20u / %46s ",    field, va_arg (argp, unsigned),           blank); goto found_it; }
+  if (!strcmp (mode, "%lu")) { snprintf (string, 200, "%-8s= %20lu / %46s ",   field, va_arg (argp, unsigned long),      blank); goto found_it; }
+  if (!strcmp (mode, "%llu")){ snprintf (string, 200, "%-8s= %20llu / %46s ",  field, va_arg (argp, unsigned long long), blank); goto found_it; }
+  if (!strcmp (mode, "%Lu")) { snprintf (string, 200, "%-8s= %20llu / %46s ",  field, va_arg (argp, unsigned long long), blank); goto found_it; }
+  if (!strcmp (mode, "%hd")) { snprintf (string, 200, "%-8s= %20d / %46s ",    field, va_arg (argp, int),                blank); goto found_it; }
+  if (!strcmp (mode, "%f"))  { snprintf (string, 200, "%-8s= %20.10f / %46s ", field, va_arg (argp, double),             blank); goto found_it; }
+  if (!strcmp (mode, "%lf")) { snprintf (string, 200, "%-8s= %20.10f / %46s ", field, va_arg (argp, double),             blank); goto found_it; }
+  if (!strcmp (mode, "%e"))  { snprintf (string, 200, "%-8s= %20.10E / %46s ", field, va_arg (argp, double),             blank); goto found_it; }
+  if (!strcmp (mode, "%le")) { snprintf (string, 200, "%-8s= %20.10E / %46s ", field, va_arg (argp, double),             blank); goto found_it; }
+  if (!strcmp (mode, "%g"))  { snprintf (string, 200, "%-8s= %20.10G / %46s ", field, va_arg (argp, double),             blank); goto found_it; }
+  if (!strcmp (mode, "%lg")) { snprintf (string, 200, "%-8s= %20.10G / %46s ", field, va_arg (argp, double),             blank); goto found_it; }
+  if (!strcmp (mode, "%jd")) { snprintf (string, 200, "%-8s= %20jd / %46s ",   field, va_arg (argp, intmax_t),           blank); goto found_it; }
 
   /* string value.  Quotes must be at least 8 chars apart.  Longer lines will this should be fixed to allow arbitrary string lengths, up to 69 chars */
@@ -69,5 +69,5 @@
     strcpy (line, ptr);
     line[68] = 0;
-    snprintf (string, 81, "%-8s= '%-8s' / %46s ", field, line, blank);
+    snprintf (string, 200, "%-8s= '%-8s' / %46s ", field, line, blank);
     goto found_it;
   }
@@ -78,5 +78,5 @@
 
 found_it:
-  strncpy (p, string, 80);
+  memcpy (p, string, 80); // do not use strncpy_nowarn: do NOT set last byte to NULL
   va_end (argp);
   return (TRUE);
@@ -89,5 +89,5 @@
 
   static char blank[] = " ";
-  char string[82], line[80];
+  char string[200], line[80];
   char *p, a;
   va_list argp;  
@@ -126,7 +126,7 @@
     a = va_arg (argp, int);
     if (a == 1)
-      snprintf (string, 81, "%-8s= %18s T / %46s ", field, blank, blank);
+      snprintf (string, 200, "%-8s= %18s T / %46s ", field, blank, blank);
     else
-      snprintf (string, 81, "%-8s= %18s F / %46s ", field, blank, blank);
+      snprintf (string, 200, "%-8s= %18s F / %46s ", field, blank, blank);
   }
 
@@ -137,6 +137,6 @@
     if (!ptr) goto invalid;
     bzero (line, 80);
-    strncpy (line, ptr, 71);
-    snprintf (string, 81, "%-8s %-71s", field, line);
+    strncpy_nowarn (line, ptr, 71);
+    snprintf (string, 200, "%-8s %-71s", field, line);
   }  
 
@@ -154,5 +154,5 @@
   if (!strcmp (mode, "%C")) goto invalid;
 
-  strncpy (p, string, 80);
+  memcpy (p, string, 80); // do not use strncpy_nowarn: do NOT set last byte to NULL
   
   va_end (argp);
Index: trunk/Ohana/src/libfits/header/F_scan.c
===================================================================
--- trunk/Ohana/src/libfits/header/F_scan.c	(revision 41739)
+++ trunk/Ohana/src/libfits/header/F_scan.c	(revision 42389)
@@ -111,5 +111,5 @@
   /* non-data entry (COMMENT, HISTORY) */
   if (!strcmp (mode, "%S")) {
-    strncpy (va_arg (argp, char *), p + 8, FT_HISTORY_LENGTH);
+    strncpy_nowarn (va_arg (argp, char *), p + 8, FT_HISTORY_LENGTH);
     return (TRUE);
   }
Index: trunk/Ohana/src/libfits/matrix/F_compress_M.c
===================================================================
--- trunk/Ohana/src/libfits/matrix/F_compress_M.c	(revision 41739)
+++ trunk/Ohana/src/libfits/matrix/F_compress_M.c	(revision 42389)
@@ -86,10 +86,10 @@
   char keyword[11];
   for (i = 0; i < header[0].Naxes; i++) {
-    snprintf (keyword, 10, "ZNAXIS%d", i + 1);
+    snprintf_nowarn (keyword, 10, "ZNAXIS%d", i + 1);
     if (!gfits_modify (theader, keyword, OFF_T_FMT, 1,  header[0].Naxis[i])) ESCAPE;
   }
 
   for (i = 0; i < header->Naxes; i++) {
-    snprintf (keyword, 10, "ZTILE%d", i + 1);
+    snprintf_nowarn (keyword, 10, "ZTILE%d", i + 1);
     if (!gfits_modify (theader, keyword, "%lu", 1, ztile[i])) ESCAPE;
   }
@@ -131,8 +131,8 @@
   // note the difference between the keywords (1 indexed) and the variables (0 indexed)
   for (i = 0; i < Noptions; i++) {
-    snprintf (key, 10, "ZNAME%d", i + 1);
+    snprintf_nowarn (key, 10, "ZNAME%d", i + 1);
     if (!gfits_modify (header, key, "%s", 1, optname[i])) break;
 
-    snprintf (key, 10, "ZVAL%d", i + 1);
+    snprintf_nowarn (key, 10, "ZVAL%d", i + 1);
     if (!gfits_modify (header, key, "%s", 1, optvalue[i])) break;
   }
Index: trunk/Ohana/src/libfits/matrix/F_uncompress_M.c
===================================================================
--- trunk/Ohana/src/libfits/matrix/F_uncompress_M.c	(revision 41739)
+++ trunk/Ohana/src/libfits/matrix/F_uncompress_M.c	(revision 42389)
@@ -90,6 +90,6 @@
   int axis;
   for (axis = 0; axis < header->Naxes; axis++) {
-    snprintf (zaxis, 10, "ZNAXIS%d", axis + 1);
-    snprintf (naxis, 10, "NAXIS%d", axis + 1);
+    snprintf_nowarn (zaxis, 10, "ZNAXIS%d", axis + 1);
+    snprintf_nowarn (naxis, 10, "NAXIS%d",  axis + 1);
     MOD_KEYWORD_REQUIRED (zaxis,  naxis,  OFF_T_FMT,  &header->Naxis[axis],  header->Naxis[axis]);
   }    
@@ -108,5 +108,5 @@
     // if ZTILE1 exists, all ZTILEn must exist:
     for (axis = 1; axis < header->Naxes; axis++) {
-      snprintf (key, 10, "ZTILE%d", axis + 1); 
+      snprintf_nowarn (key, 10, "ZTILE%d", axis + 1); 
       if (!gfits_scan (header, key, "%lu", 1, &ztile[axis])) ESCAPE;
       gfits_delete (header, key, 1);
Index: trunk/Ohana/src/libfits/table/F_create_TH.c
===================================================================
--- trunk/Ohana/src/libfits/table/F_create_TH.c	(revision 41739)
+++ trunk/Ohana/src/libfits/table/F_create_TH.c	(revision 42389)
@@ -17,8 +17,10 @@
   myAssert (!header->buffer, "failed to init header or free buffer?");
   ALLOCATE (header[0].buffer, char, NBYTES);
+  bzero (header[0].buffer, NBYTES);
   
-  for (i = 0; i < NBYTES; i++) 
-  header[0].buffer[i] = ' ';
-  strncpy (header[0].buffer, "END", 3);
+  for (i = 0; i < NBYTES; i++) header[0].buffer[i] = ' ';
+  header[0].buffer[0] = 'E';
+  header[0].buffer[1] = 'N';
+  header[0].buffer[2] = 'D';
   
   gfits_modify (header, "XTENSION", "%s", 1, type);
Index: trunk/Ohana/src/libfits/table/F_get_T_column.c
===================================================================
--- trunk/Ohana/src/libfits/table/F_get_T_column.c	(revision 41739)
+++ trunk/Ohana/src/libfits/table/F_get_T_column.c	(revision 42389)
@@ -32,6 +32,5 @@
     ALLOCATE (Ivalues, int, table[0].Naxis[1]);
     for (i = 0; i < table[0].Naxis[1]; i++) {
-      strncpy (tmp, &table[0].buffer[i*table[0].Naxis[0] + start], Nchar);
-      tmp[Nchar] = 0;
+      strncpy_nowarn (tmp, &table[0].buffer[i*table[0].Naxis[0] + start], Nchar);
       Ivalues[i] = atof (tmp);
     }
@@ -41,6 +40,5 @@
     ALLOCATE (Dvalues, double, table[0].Naxis[1]);
     for (i = 0; i < table[0].Naxis[1]; i++) {
-      strncpy (tmp, &table[0].buffer[i*table[0].Naxis[0] + start], Nchar);
-      tmp[Nchar] = 0;
+      strncpy_nowarn (tmp, &table[0].buffer[i*table[0].Naxis[0] + start], Nchar);
       Dvalues[i] = atof (tmp);
     }
@@ -53,6 +51,5 @@
     for (i = 0; i < table[0].Naxis[1]; i++) {
       ALLOCATE (Cvalues[i], char, N + 1);
-      strncpy (Cvalues[i], &table[0].buffer[i*table[0].Naxis[0] + start], N);
-      Cvalues[i][N] = 0;
+      strncpy_nowarn (Cvalues[i], &table[0].buffer[i*table[0].Naxis[0] + start], N);
     }
     values[0] = (char *) Cvalues;
Index: trunk/Ohana/src/libfits/table/F_get_T_value.c
===================================================================
--- trunk/Ohana/src/libfits/table/F_get_T_value.c	(revision 41739)
+++ trunk/Ohana/src/libfits/table/F_get_T_value.c	(revision 42389)
@@ -26,6 +26,5 @@
   
   byte = Y*table[0].Naxis[0] + start;
-  strncpy (tmp, &table[0].buffer[byte], Nchar);
-  tmp[Nchar] = 0;
+  strncpy_nowarn (tmp, &table[0].buffer[byte], Nchar);
 
   if (!strcmp (mode, "%d"))  *(int      *) value = (int)      atof (tmp);
Index: trunk/Ohana/src/libfits/table/F_table_column.c
===================================================================
--- trunk/Ohana/src/libfits/table/F_table_column.c	(revision 41739)
+++ trunk/Ohana/src/libfits/table/F_table_column.c	(revision 42389)
@@ -72,6 +72,5 @@
 
   for (i = 0; i < table[0].Naxis[1]; i++) {
-    strncpy (temp, &table[0].buffer[i*table[0].Naxis[0] + start - 1], width);
-    temp[width] = 0;
+    strncpy_nowarn (temp, &table[0].buffer[i*table[0].Naxis[0] + start - 1], width);
     switch (M) {
     case 0:
