Index: /trunk/Ohana/src/tools/Makefile
===================================================================
--- /trunk/Ohana/src/tools/Makefile	(revision 37040)
+++ /trunk/Ohana/src/tools/Makefile	(revision 37041)
@@ -17,5 +17,5 @@
 PROGRAMS = gconfig fhead ftable fields list_astro glockfile \
 radec mktemp precess csystem fits_insert \
-medianfilter mefhead ckfits roc
+medianfilter mefhead ckfits roc random
 
 all tools: $(PROGRAMS)
Index: /trunk/Ohana/src/tools/src/ftable.c
===================================================================
--- /trunk/Ohana/src/tools/src/ftable.c	(revision 37040)
+++ /trunk/Ohana/src/tools/src/ftable.c	(revision 37041)
@@ -460,4 +460,12 @@
       } else {
 	for (j = 0; j < Nv; j++) {
+	  if (!strcmp (type, "byte")) {
+	    memcpy (line, &data[i*Nv*Nb + Nb*j], Nb);
+	    fprintf (stdout, "%d ", *(char *)line);
+	  }
+	  if (!strcmp (type, "short")) {
+	    memcpy (line, &data[i*Nv*Nb + Nb*j], Nb);
+	    fprintf (stdout, "%d ", *(short *)line);
+	  }
 	  if (!strcmp (type, "int")) {
 	    memcpy (line, &data[i*Nv*Nb + Nb*j], Nb);
Index: /trunk/Ohana/src/tools/src/random.c
===================================================================
--- /trunk/Ohana/src/tools/src/random.c	(revision 37041)
+++ /trunk/Ohana/src/tools/src/random.c	(revision 37041)
@@ -0,0 +1,63 @@
+# include <ohana.h>
+# define NBUFFER 8000000
+
+int main (int argc, char **argv) {
+
+  char c;
+  int i, j, N;
+
+  int FAST = FALSE;
+  if ((N = get_argument (argc, argv, "-fast"))) {
+    remove_argument (N, &argc, argv);
+    FAST = TRUE;
+  }
+
+  if (argc != 2) {
+    fprintf (stderr, "USAGE: random (Nbytes) [-fast]\n");
+    fprintf (stderr, "  generates Nbytes of random characters, to stdout\n");
+    fprintf (stderr, "  [-fast generates non random bytes, but ~2x faster]\n");
+    exit (1);
+  }
+
+  long A = time(NULL);
+  srand48(A);
+
+  int Nbytes = atoi (argv[1]);
+  char buffer[NBUFFER];
+
+  int Nblock = Nbytes / NBUFFER;
+  int Nextra = Nbytes - (Nblock * NBUFFER);
+
+  for (j = 0; j < Nblock; j++) {
+    for (i = 0; i < NBUFFER; i++) {
+      if (i % 80 == 0) {
+	buffer[i] = '\n';
+	continue;
+      }
+      if (FAST) {
+	c = (i % 90) + 33;
+      } else {
+	c = (char) 90*drand48() + 33;
+      }
+      buffer[i] = c;
+    }
+    fwrite (buffer, 1, NBUFFER, stdout);
+  }
+  for (i = 0; i < Nextra - 1; i++) {
+    if (i % 80 == 0) {
+      buffer[i] = '\n';
+      continue;
+    }
+    if (FAST) {
+      c = (i % 90) + 33;
+    } else {
+      c = (char) 90*drand48() + 33;
+    }
+    buffer[i] = c;
+  }
+  buffer[i] = '\n';
+  fwrite (buffer, 1, Nextra, stdout);
+  exit (0);
+}
+
+
