Index: trunk/Ohana/src/opihi/cmd.data/Makefile
===================================================================
--- trunk/Ohana/src/opihi/cmd.data/Makefile	(revision 42332)
+++ trunk/Ohana/src/opihi/cmd.data/Makefile	(revision 42389)
@@ -140,4 +140,5 @@
 $(SRC)/radial.$(ARCH).o	\
 $(SRC)/rd.$(ARCH).o		\
+$(SRC)/rdjpg.$(ARCH).o		\
 $(SRC)/rdseg.$(ARCH).o		\
 $(SRC)/read_vectors.$(ARCH).o	\
@@ -154,4 +155,5 @@
 $(SRC)/set.$(ARCH).o		\
 $(SRC)/shift.$(ARCH).o		\
+$(SRC)/opihi_size.$(ARCH).o        \
 $(SRC)/sort.$(ARCH).o		\
 $(SRC)/spline.$(ARCH).o		\
Index: trunk/Ohana/src/opihi/cmd.data/cursor.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.data/cursor.c	(revision 42332)
+++ trunk/Ohana/src/opihi/cmd.data/cursor.c	(revision 42389)
@@ -42,14 +42,9 @@
     KiiCursorRead (kapa, &X, &Y, &Z, &R, &D, key);
 
-    sprintf (string, "X%s", key);
-    set_variable (string, X);
-    sprintf (string, "Y%s", key);
-    set_variable (string, Y);
-    sprintf (string, "Z%s", key);
-    set_variable (string, Z);
-    sprintf (string, "R%s", key);
-    set_variable (string, R);
-    sprintf (string, "D%s", key);
-    set_variable (string, D);
+    snprintf_nowarn (string, 20, "X%s", key);    set_variable (string, X);
+    snprintf_nowarn (string, 20, "Y%s", key);    set_variable (string, Y);
+    snprintf_nowarn (string, 20, "Z%s", key);    set_variable (string, Z);
+    snprintf_nowarn (string, 20, "R%s", key);    set_variable (string, R);
+    snprintf_nowarn (string, 20, "D%s", key);    set_variable (string, D);
 
     set_str_variable ("KEY", key);
Index: trunk/Ohana/src/opihi/cmd.data/init.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.data/init.c	(revision 42332)
+++ trunk/Ohana/src/opihi/cmd.data/init.c	(revision 42389)
@@ -126,4 +126,5 @@
 int queue2book       PROTO((int, char **));
 int rd               PROTO((int, char **));
+int rdjpg            PROTO((int, char **));
 int rdseg            PROTO((int, char **));
 int read_vectors     PROTO((int, char **));
@@ -160,4 +161,5 @@
 int tvgrid           PROTO((int, char **));
 int opihi_type       PROTO((int, char **));
+int opihi_size       PROTO((int, char **));
 int uniq             PROTO((int, char **));
 int uniqpair         PROTO((int, char **));
@@ -336,4 +338,5 @@
   {1, "ipptool2book", queue2book,       "convert queue with ipptool output to book"},
   {1, "rd",           rd,               "load fits image"},
+  {1, "rdjpg",        rdjpg,            "load jpeg image"},
   {1, "rdseg",        rdseg,            "read a segment of an image from a file"},
   {1, "read",         read_vectors,     "read vectors from datafile"},
@@ -350,4 +353,5 @@
   {1, "set",          set,              "image and vector math"},
   {1, "shift",        shift,            "shift data in an image"},
+  {1, "size",         opihi_size,       "get vector/matrix dimension/size information"},
   {1, "sort",         sort_vectors,     "sort list of vectors"},
   {1, "spline",       spline_command,   "shift data in an image"},
Index: trunk/Ohana/src/opihi/cmd.data/limits.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.data/limits.c	(revision 42332)
+++ trunk/Ohana/src/opihi/cmd.data/limits.c	(revision 42389)
@@ -61,4 +61,5 @@
     APPLY = TRUE;
   }
+
   char *name = NULL;
   if ((N = get_argument (argc, argv, "-n"))) {
@@ -67,7 +68,16 @@
     remove_argument (N, &argc, argv);
   }
-
   if (!GetGraph (&graphmode, &kapa, name)) return (FALSE);
   FREE (name);
+
+  // this is not super intuitive
+  if ((N = get_argument (argc, argv, "-boxsize"))) {
+    remove_argument (N, &argc, argv);
+    float dx, dy;
+    // ask kapa for the size of the graph region in pixels
+    KapaGetLimits (kapa, &dx, &dy);
+    set_variable ("KAPA_XPIX", fabs(dx));
+    set_variable ("KAPA_YPIX", fabs(dy));
+  }
 
   // XXX need an option to set the limits based on the current image bounds
@@ -169,2 +179,15 @@
   return (TRUE);
 }
+
+/* -minX value : the minimum X axis value will be no higher than this value
+   -maxX value : the maximum X axis value will be no lower than this value
+   -delX value : the range of the X axis will be at least this value
+
+   These can be used to prevent the range from collapsing.  
+   These are only used if the -a option is supplied, otherwise the supplied or auto-calculated 
+   ranges are used (this seems like an poor choice)
+
+*/
+
+
+   
Index: trunk/Ohana/src/opihi/cmd.data/opihi_size.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.data/opihi_size.c	(revision 42389)
+++ trunk/Ohana/src/opihi/cmd.data/opihi_size.c	(revision 42389)
@@ -0,0 +1,68 @@
+# include "data.h"
+
+int opihi_size (int argc, char **argv) {
+  
+  int N;
+
+  char *resultName = NULL;
+  Vector *resultVec = NULL;
+  if ((N = get_argument (argc, argv, "-result"))) {
+    remove_argument (N, &argc, argv);
+    resultName = strcreate (argv[N]);
+    remove_argument (N, &argc, argv);
+    if ((resultVec = SelectVector (resultName, ANYVECTOR, FALSE)) == NULL)   {
+      gprint (GP_ERR, "invalid vector name %s for return result\n", resultName);
+      FREE (resultName);
+      return FALSE;
+    }
+  }
+
+  if (argc != 2) goto usage;
+
+  Vector *vec = NULL;
+  Buffer *buf = NULL;
+
+  // is it a Vector?
+  if ((vec = SelectVector (argv[1], OLDVECTOR, FALSE)) != NULL) {
+    if (resultVec) {
+      ResetVector (resultVec, OPIHI_INT, 1);
+      resultVec->elements.Int[0] = vec->Nelements;
+    } else {
+      gprint (GP_LOG, "%s vector size %d\n", argv[1], vec->Nelements);
+    }
+    goto got_result;
+  }
+
+  // is it a Matrix (Buffer)?
+  if ((buf = SelectBuffer (argv[1], OLDBUFFER, FALSE)) != NULL) {
+    if (resultVec) {
+      ResetVector (resultVec, OPIHI_INT, buf->header.Naxes);
+      for (int i = 0; i < buf->header.Naxes; i++) {
+	resultVec->elements.Int[i] = buf->header.Naxis[i];
+      }
+    } else {
+      gprint (GP_LOG, "%s matrix sizes ", argv[1]);
+      for (int i = 0; i < buf->header.Naxes; i++) {
+	gprint (GP_LOG, " %d", (int) buf->header.Naxis[i]);
+      }
+      gprint (GP_LOG, "\n");
+    }
+    goto got_result;
+  }
+  
+  if (resultVec) {
+    ResetVector (resultVec, OPIHI_INT, 0);
+  } else {
+    gprint (GP_LOG, "%s not defined\n", argv[1]);
+  }
+
+got_result:
+  FREE (resultName);
+  return TRUE;
+  
+usage:
+  gprint (GP_ERR, "SYNTAX: size (vector/buffer) [-result vector]\n");
+  gprint (GP_ERR, "  returns type (vector/matrix) and sizes\n");
+  gprint (GP_ERR, "  returns sizes in vector if -result is supplied\n");
+  return (FALSE);
+}
Index: trunk/Ohana/src/opihi/cmd.data/rdjpg.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.data/rdjpg.c	(revision 42389)
+++ trunk/Ohana/src/opihi/cmd.data/rdjpg.c	(revision 42389)
@@ -0,0 +1,125 @@
+# include "data.h"
+# include "jpeglib.h"
+# include <setjmp.h>
+
+struct my_error_mgr {
+  struct jpeg_error_mgr pub;	/* "public" fields */
+  jmp_buf setjmp_buffer;	/* for return to caller */
+};
+
+typedef struct my_error_mgr * my_error_ptr;
+
+METHODDEF(void) my_error_exit (j_common_ptr cinfo)
+{
+  fprintf (stderr, "got an error\n");
+
+  /* cinfo->err really points to a my_error_mgr struct, so coerce pointer */
+  my_error_ptr myerr = (my_error_ptr) cinfo->err;
+
+  /* Always display the message. */
+  /* We could postpone this until after returning, if we chose. */
+  (*cinfo->err->output_message) (cinfo);
+
+  /* Return control to the setjmp point */
+  longjmp(myerr->setjmp_buffer, 1);
+}
+
+int rdjpg (int argc, char **argv) {
+  
+  int N;
+  Buffer *buf;
+
+  struct jpeg_decompress_struct cinfo;
+  struct my_error_mgr jerr;
+
+  int VERBOSE = FALSE;
+  if ((N = get_argument (argc, argv, "-v"))) {
+    remove_argument (N, &argc, argv);
+    VERBOSE = TRUE;
+  }
+
+  if (argc != 3) {
+    gprint (GP_ERR, "USAGE: rdjpg <buffer> <filename>\n");
+    return (FALSE);
+  }
+
+  // open input file for read
+  FILE *f = fopen (argv[2], "r");
+  if (f == (FILE *) NULL) {
+    gprint (GP_ERR, "file %s not found\n", argv[2]);
+    return (FALSE);
+  }
+
+  // find matrix, free old data
+  if ((buf = SelectBuffer (argv[1], ANYBUFFER, TRUE)) == NULL) {
+    fclose (f);
+    return (FALSE);
+  }
+  gfits_free_matrix (&buf[0].matrix);
+  gfits_free_header (&buf[0].header);
+
+  // save file name in buffer info
+  char *filename = filebasename (argv[2]);
+  strcpy (buf[0].file, filename);
+  free (filename);
+
+  // the setup for the error handling seems a bit circular, but this
+  // example from the libjpeg example.c seems to work?
+  cinfo.err = jpeg_std_error(&jerr.pub);
+  jerr.pub.error_exit = my_error_exit;
+
+  // an error in the jpeg code will jump (goto) here:
+  if (setjmp(jerr.setjmp_buffer)) {
+    /* If we get here, the JPEG code has signaled an error.
+     * We need to clean up the JPEG object, close the input file, and return.
+     */
+    jpeg_destroy_decompress(&cinfo);
+    fclose(f);
+    return FALSE;
+  }
+
+  /* Now we can initialize the JPEG decompression object. */
+  jpeg_create_decompress(&cinfo);
+  jpeg_stdio_src(&cinfo, f);
+  jpeg_read_header(&cinfo, TRUE);
+  jpeg_start_decompress(&cinfo);
+
+  /* JSAMPLEs per row in output buffer */
+  int Nx = cinfo.output_width;
+  int Ny = cinfo.output_height;
+  int Npix_row = Nx * cinfo.output_components;
+
+  CreateBuffer (buf, Nx, Ny, -32, 0.0, 1.0);
+  float *Vout = (float *)buf[0].matrix.buffer;
+
+  /* Make a one-row-high sample array that will go away when done with image */
+  JSAMPARRAY buffer = (*cinfo.mem->alloc_sarray) ((j_common_ptr) &cinfo, JPOOL_IMAGE, Npix_row, 1);
+
+  // read each of the scanlines
+  for (int iy = 0; iy < Ny; iy++) {
+    jpeg_read_scanlines(&cinfo, buffer, 1);
+
+    // for now just copy R + G + B as the total value:
+    for (int ix = 0; ix < Nx; ix ++) {
+      unsigned char Rpix = buffer[0][3*ix + 0];
+      unsigned char Gpix = buffer[0][3*ix + 1];
+      unsigned char Bpix = buffer[0][3*ix + 2];
+      float value = Rpix + Gpix + Bpix;
+      Vout[Nx*iy + ix] = value;
+    }
+  }
+    
+  jpeg_finish_decompress(&cinfo);
+  jpeg_destroy_decompress(&cinfo);
+  
+  fclose (f);
+  
+  buf[0].bitpix = buf[0].header.bitpix;    /* store the original values */
+  buf[0].bscale = buf[0].header.bscale;    /* store the original values */
+  buf[0].bzero  = buf[0].header.bzero;     /* store the original values */
+  buf[0].unsign = buf[0].header.unsign;
+
+  if (VERBOSE) gprint (GP_LOG, "read "OFF_T_FMT" bytes from %s into buffer %s\n", buf[0].header.datasize + buf[0].matrix.datasize, argv[2], argv[1]);
+
+  return (TRUE);
+}
Index: trunk/Ohana/src/opihi/cmd.data/read_vectors.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.data/read_vectors.c	(revision 42332)
+++ trunk/Ohana/src/opihi/cmd.data/read_vectors.c	(revision 42389)
@@ -385,6 +385,5 @@
       if (!lineStatus && VERBOSE) {
 	char temp[32];
-	strncpy (temp, c0, 32);
-	temp[31] = 0;
+	strncpy_nowarn (temp, c0, 31);
 	gprint (GP_ERR, "skip line %s\n\n", temp);
       }
Index: trunk/Ohana/src/opihi/cmd.data/reindex.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.data/reindex.c	(revision 42332)
+++ trunk/Ohana/src/opihi/cmd.data/reindex.c	(revision 42389)
@@ -72,4 +72,23 @@
     }
   }
+  if (ivec->type == OPIHI_STR) {
+    opihi_int *vx = xvec[0].elements.Int;
+    for (Npts = i = 0; i < xvec[0].Nelements; i++, vx++) {
+      if (Npts >= NPTS) {
+	NPTS += 2000;
+	REALLOCATE (ovec[0].elements.Str, char *, NPTS);
+      }
+      if (*vx < 0) {
+	if (KEEP_UNMATCH) {
+	  ovec[0].elements.Str[Npts] = strcreate(""); // XXX use a different or a specified value?
+	  Npts++;
+	} 
+	continue;
+      }
+      if (*vx > Nmax) ESCAPE("unexpected value in index: "OPIHI_INT_FMT" (%d)\n", *vx, i);
+      ovec[0].elements.Str[Npts] = strcreate(ivec->elements.Str[*vx]);
+      Npts++;
+    }
+  }
 
   // free up unused memory
Index: trunk/Ohana/src/opihi/cmd.data/subset.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.data/subset.c	(revision 42332)
+++ trunk/Ohana/src/opihi/cmd.data/subset.c	(revision 42389)
@@ -44,5 +44,5 @@
   ResetVector (ovec, ivec->type, tvec[0].Nelements);
 
-  // we have four cases: (ivec == flt or int) and (tvec == flt or int)
+  // we have size cases: (ivec == flt, int, str) and (tvec == flt or int)
   if ((ivec->type == OPIHI_FLT) && (tvec->type == OPIHI_FLT)) {
     opihi_flt *vi = ivec[0].elements.Flt;
@@ -81,9 +81,12 @@
     }
   }
+  // XXX if ivec is an existing vector, this step will
+  // leak (existing elements need to be freed if they
+  // have been allocated).
   if ((ivec->type == OPIHI_STR) && (tvec->type == OPIHI_FLT)) {
     opihi_flt *vt = tvec[0].elements.Flt;
     for (Npts = i = 0; i < tvec[0].Nelements; i++, vt++) {
       if (!*vt) continue;
-      ovec[0].elements.Str[Npts] = strcreate (ivec[0].elements.Str[i]);
+      ovec[0].elements.Str[Npts] = strcreate(ivec[0].elements.Str[i]);
       Npts++;
     }
@@ -93,5 +96,5 @@
     for (Npts = i = 0; i < tvec[0].Nelements; i++, vt++) {
       if (!*vt) continue;
-      ovec[0].elements.Str[Npts] = strcreate (ivec[0].elements.Str[i]);
+      ovec[0].elements.Str[Npts] = strcreate(ivec[0].elements.Str[i]);
       Npts++;
     }
Index: trunk/Ohana/src/opihi/cmd.data/svd.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.data/svd.c	(revision 42332)
+++ trunk/Ohana/src/opihi/cmd.data/svd.c	(revision 42389)
@@ -58,5 +58,5 @@
 
   // try C.R. Bond's version -- requires matrices in the form A[row][col] not A[row*Ncol + col]
-  if (1) { 
+  if (0) { 
       int j;
       double **a, **u, **v, *q;
Index: trunk/Ohana/src/opihi/cmd.data/test/histogram.sh
===================================================================
--- trunk/Ohana/src/opihi/cmd.data/test/histogram.sh	(revision 42332)
+++ trunk/Ohana/src/opihi/cmd.data/test/histogram.sh	(revision 42389)
@@ -35,6 +35,9 @@
  local i
 
- list word -x "ps -p $PID -o rss"
- $startmem = $word:1
+ create xhis 0 10 0.1
+ $i = 1
+
+ memory stats
+ $startmem = $memory:Ntotal
 
  for i 0 1000
@@ -42,6 +45,6 @@
  end
   
- list word -x "ps -p $PID -o rss"
- $endmem = $word:1
+ memory stats
+ $endmem = $memory:Ntotal
 
  $PASS = 1
Index: trunk/Ohana/src/opihi/cmd.data/test/join.sh
===================================================================
--- trunk/Ohana/src/opihi/cmd.data/test/join.sh	(revision 42332)
+++ trunk/Ohana/src/opihi/cmd.data/test/join.sh	(revision 42389)
@@ -21,65 +21,4 @@
 
  join ID1 ID2 
-
-mana: for i 0 index1[]
->> echo index1[$i] index2[$i]
->> end
-0 2
-2 1
-4 0
-5 3
-mana: join ID1 ID2 -outer
-mana: vectors 
-    N       name      size
-    0        ID1          6 (INT)
-    1       val1          6 (FLT)
-    2        ID2          4 (INT)
-    3        val          4 (FLT)
-    4     index1          6 (INT)
-    5     index2          4 (INT)
-mana: for i 0 index1[]
->> echo index1[$i]
->> end
-2
--1
-1
--1
-0
-3
-mana: echo ID1[2]
-3
-mana: echo ID1[0] ID2[2]
-1 1
-mana: for i 0 index1[]
->> if (index1[$i] == -1) continue
->> $N = index1[$i]
->> echo $i index1[$i] ID1[$i] ID2[$N]
->> end
-0 2 1 1
-2 1 3 3
-4 0 5 5
-5 3 6 6
-mana: for i 0 index2[]
->> if (index2[$i] == -1) continue
->> $N = index2[$i]
->> echo $i index2[$i] ID2[$i] ID1[$N]
->> end
-0 4 5 5
-1 2 3 3
-2 0 1 1
-3 5 6 6
-mana: 
-
- # if ((xvec[1024] != 17) || (yvec[1024] != 100))
- #  $PASS = 0
- #  echo "Value mismatch: xvec[1024] yvec[1024] (should be 17,100)"
- # end
- # 
- # imhist -q buff xvec yvec -region 40 0 25 10 -range 0 10
- # 
- # if ((xvec[1024] != 10) || (yvec[1024] != 100))
- #  $PASS = 0
- #  echo "Value mismatch: xvec[1024] yvec[1024] (should be 10,100)"
- # end
 
 end
Index: trunk/Ohana/src/opihi/cmd.data/threshold.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.data/threshold.c	(revision 42332)
+++ trunk/Ohana/src/opihi/cmd.data/threshold.c	(revision 42389)
@@ -3,9 +3,10 @@
 int QUIET = FALSE;
 
-void _threshold_set_values (double value, int Nbin, double level) {
+void _threshold_set_values (double value, int Nbin, double level, int thresherr) {
 
   set_variable ("threshval", value);
   set_int_variable ("threshbin", Nbin);
   set_variable ("threshold", level);
+  set_int_variable ("thresherr", thresherr);
 
   if (!QUIET) gprint (GP_LOG, "theshold %f (bin %d is %f)\n", level, Nbin, value);
@@ -117,9 +118,9 @@
     if (vecy[0].elements.Flt[BinMin] > value) {
       if (SATURATE) {
-	_threshold_set_values (vecy[0].elements.Flt[BinMin], BinMin, vecx[0].elements.Flt[BinMin]);
+	_threshold_set_values (vecy[0].elements.Flt[BinMin], BinMin, vecx[0].elements.Flt[BinMin], 1);
 	return TRUE;
       } else {
 	gprint (GP_ERR, "ERROR: all values above threshold\n");
-	_threshold_set_values (NAN, -1, NAN);
+	_threshold_set_values (NAN, -1, NAN, 1);
 	return FALSE;
       }
@@ -127,9 +128,9 @@
     if (vecy[0].elements.Flt[BinMax] < value) {
       if (SATURATE) {
-	_threshold_set_values (vecy[0].elements.Flt[BinMax], BinMax, vecx[0].elements.Flt[BinMax]);
+	_threshold_set_values (vecy[0].elements.Flt[BinMax], BinMax, vecx[0].elements.Flt[BinMax], 1);
 	return TRUE;
       } else {
 	gprint (GP_ERR, "ERROR: all values below threshold\n");
-	_threshold_set_values (NAN, -1, NAN);
+	_threshold_set_values (NAN, -1, NAN, 1);
 	return FALSE;
       }
@@ -156,9 +157,9 @@
     if (vecy[0].elements.Flt[BinMin] < value) {
       if (SATURATE) {
-	_threshold_set_values (vecy[0].elements.Flt[BinMin], BinMin, vecx[0].elements.Flt[BinMin]);
+	_threshold_set_values (vecy[0].elements.Flt[BinMin], BinMin, vecx[0].elements.Flt[BinMin], 1);
 	return TRUE;
       } else {
 	gprint (GP_ERR, "ERROR: all values below threshold\n");
-	_threshold_set_values (NAN, -1, NAN);
+	_threshold_set_values (NAN, -1, NAN, 1);
 	return FALSE;
       }
@@ -166,9 +167,9 @@
     if (vecy[0].elements.Flt[BinMax] > value) {
       if (SATURATE) {
-	_threshold_set_values (vecy[0].elements.Flt[BinMax], BinMax, vecx[0].elements.Flt[BinMax]);
+	_threshold_set_values (vecy[0].elements.Flt[BinMax], BinMax, vecx[0].elements.Flt[BinMax], 1);
 	return TRUE;
       } else {
 	gprint (GP_ERR, "ERROR: all values above threshold\n");
-	_threshold_set_values (NAN, -1, NAN);
+	_threshold_set_values (NAN, -1, NAN, 1);
 	return FALSE;
       }
@@ -219,5 +220,5 @@
   }
 
-  _threshold_set_values (y1, Nhi, Xvalue);
+  _threshold_set_values (y1, Nhi, Xvalue, 0);
   return (TRUE);
 }
Index: trunk/Ohana/src/opihi/cmd.data/tvcolors.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.data/tvcolors.c	(revision 42332)
+++ trunk/Ohana/src/opihi/cmd.data/tvcolors.c	(revision 42389)
@@ -41,4 +41,15 @@
     gprint (GP_ERR, "   f: 0 - 1 defines the scale value for the transition\n");
     gprint (GP_ERR, "   R,G,B: 0 - 1 define the value of the color at the transition point\n");
+
+    gprint (GP_ERR, "   There are 5 colormap file format options:\n");
+    gprint (GP_ERR, "   * file:filename : index Red Green Blue\n");
+    gprint (GP_ERR, "   * lgcy:filename : index Red Blue Green\n");
+    gprint (GP_ERR, "   * csvf:filename : index,Red,Green,Blue\n");
+    gprint (GP_ERR, "   * cetf:filename : fRed,fGreen,fBlue \n");
+    gprint (GP_ERR, "   * cetr:filename : fRed,fGreen,fBlue \n\n");
+    gprint (GP_ERR, "   The index value goes from 0.0 to 1.0 and sets transitions (must be monotonic).\n");
+    gprint (GP_ERR, "   In the CET cases, the index is implicit, with 256 entries expected.\n");
+    gprint (GP_ERR, "   For cetr: the index is reversed.\n");
+
     return (FALSE);
   }
Index: trunk/Ohana/src/opihi/cmd.data/wd.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.data/wd.c	(revision 42332)
+++ trunk/Ohana/src/opihi/cmd.data/wd.c	(revision 42389)
@@ -115,5 +115,5 @@
       Ns = strlen (simple);
       No = 80 - Ns;
-      strncpy (temp_header.buffer, simple, Ns);
+      strncpy_nowarn (temp_header.buffer, simple, Ns);
       memset (&temp_header.buffer[Ns], ' ', No);
     }
@@ -275,25 +275,2 @@
   return (f);
 }
-
-
-///    /* fix up header */
-///    {
-///      static char simple[] = "XTENSION= 'IMAGE  '            / Image extension";
-///      int Ns, No;
-///      Ns = strlen (simple);
-///      No = 80 - Ns;
-///      strncpy (temp_header.buffer, simple, Ns);
-///      memset (&temp_header.buffer[Ns], ' ', No);
-///    }
-///
-///    /* position to end of file to write new extend */
-///    fseeko (f, 0LL, SEEK_END);
-///    nbytes = fwrite (temp_header.buffer, 1, temp_header.datasize, f);
-///    fclose (f);
-///    if (nbytes != temp_header.datasize) {
-///      gprint (GP_ERR, "failed to write file\n");
-///      status = FALSE;
-///      goto done1;
-///    }
-///
-///  }
Index: trunk/Ohana/src/opihi/cmd.data/write_vectors.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.data/write_vectors.c	(revision 42332)
+++ trunk/Ohana/src/opihi/cmd.data/write_vectors.c	(revision 42389)
@@ -214,5 +214,5 @@
     /* identify type (%NNNNd %NNNNf) */
     for (p2 = p1 + 1; (*p2 == '.') || (*p2 == '-') || (*p2 == '+') || (*p2 == ' ') || isdigit(*p2); p2++);
-    strncpy (fmtlist[j], p0, p2 - p0 + 1);
+    strncpy_nowarn (fmtlist[j], p0, p2 - p0 + 1);
     switch (*p2) {
       case 'e':
