Index: trunk/Ohana/src/imregister/detrend/altpath.c
===================================================================
--- trunk/Ohana/src/imregister/detrend/altpath.c	(revision 40500)
+++ trunk/Ohana/src/imregister/detrend/altpath.c	(revision 40501)
@@ -7,5 +7,5 @@
   off_t i, j, n, Nlist;
   off_t *list;
-  char *dBPath, infile[256], outfile[256], line[1024];
+  char *dBPath, infile[512], outfile[512], line[1100];
   struct stat statbuf;
 
@@ -28,6 +28,6 @@
       i = list[j];
       for (n = 0; n < NDetrendAltDB; n++) {
-	sprintf (infile, "%s/%s", dBPath, image[i].filename);
-	sprintf (outfile, "%s/%s", DetrendAltDB[n], image[i].filename);
+	snprintf (infile, 512, "%s/%s", dBPath, image[i].filename);
+	snprintf (outfile, 512, "%s/%s", DetrendAltDB[n], image[i].filename);
 	status = ckpathname (outfile);
 	if (!status) {
@@ -35,5 +35,5 @@
 	  continue;
 	}
-	sprintf (line, "cp %s %s", infile, outfile);
+	snprintf (line, 1100, "cp %s %s", infile, outfile);
 	fprintf (stderr, "%s\n", line);
 	status = system (line);
@@ -73,6 +73,6 @@
       image[i].altpath = FALSE;
       for (n = 0; n < NDetrendAltDB; n++) {
-	sprintf (outfile, "%s/%s", DetrendAltDB[n], image[i].filename);
-	sprintf (line, "rm %s", outfile);
+	snprintf (outfile, 512, "%s/%s", DetrendAltDB[n], image[i].filename);
+	snprintf (line, 1100, "rm %s", outfile);
 	fprintf (stderr, "%s\n", line);
 	status = system (line);
@@ -104,5 +104,5 @@
       found = TRUE;
       for (n = 0; found && (n < NDetrendAltDB); n++) {
-	sprintf (outfile, "%s/%s", DetrendAltDB[n], image[i].filename);
+	snprintf (outfile, 512, "%s/%s", DetrendAltDB[n], image[i].filename);
 	status = stat (outfile, &statbuf);
 	fprintf (stderr, "checking for %s, status is %d\n", outfile, status);
Index: trunk/Ohana/src/imregister/detrend/db_names.c
===================================================================
--- trunk/Ohana/src/imregister/detrend/db_names.c	(revision 40500)
+++ trunk/Ohana/src/imregister/detrend/db_names.c	(revision 40501)
@@ -52,8 +52,8 @@
   
   int status;
-  char line[256];
+  char line[512];
 
   if (output.verbose) fprintf (stderr, "deleting %s\n", item[0].filename);
-  sprintf (line, "mv -f %s/%s %s", dBPath, item[0].filename, dBTrash);
+  snprintf (line, 512, "mv -f %s/%s %s", dBPath, item[0].filename, dBTrash);
   status = system (line);
   if (status) fprintf (stderr, "trouble moving %s to trash (%s)\n", item[0].filename, dBTrash);
Index: trunk/Ohana/src/imregister/detrend/output.c
===================================================================
--- trunk/Ohana/src/imregister/detrend/output.c	(revision 40500)
+++ trunk/Ohana/src/imregister/detrend/output.c	(revision 40501)
@@ -193,5 +193,5 @@
 int PrintSubset (DetReg *detdata, Match *match, off_t Nmatch) {
   
-  char *dBPath, *Path, *typestr, *filtstr, filename[128];
+  char *dBPath, *Path, *typestr, *filtstr, filename[512];
   char *timestr, *modestr, *ccdstr, ccdinfo[16], ccdformat[16];
   off_t i, j;
@@ -239,5 +239,5 @@
     /* output mode (Select vs List) */
     if (output.Chipname && criteria[0].CCDSelect && detdata[i].mode == M_MEF) {
-      snprintf (filename, 128, "%s[%s]", detdata[i].filename, ccds[criteria[0].CCD]);
+      snprintf (filename, 512, "%s[%s]", detdata[i].filename, ccds[criteria[0].CCD]);
     } else {
       strcpy (filename, detdata[i].filename);
Index: trunk/Ohana/src/kapa2/include/constants.h
===================================================================
--- trunk/Ohana/src/kapa2/include/constants.h	(revision 40500)
+++ trunk/Ohana/src/kapa2/include/constants.h	(revision 40501)
@@ -11,4 +11,5 @@
 
 # define NCHANNELS 10
+# define LONG_LINE_LENGTH 1024
 
 # define PAD1  3
Index: trunk/Ohana/src/kapa2/include/structures.h
===================================================================
--- trunk/Ohana/src/kapa2/include/structures.h	(revision 40500)
+++ trunk/Ohana/src/kapa2/include/structures.h	(revision 40501)
@@ -64,6 +64,6 @@
   int      x, y, dx, dy;   /* position and size */
   char    *label;          /* label on TextLine */
-  char     text[1024];     /* words of TextLine */
-  char     old_text[1024]; /* words of TextLine */
+  char     text[LONG_LINE_LENGTH];     /* words of TextLine */
+  char     old_text[LONG_LINE_LENGTH]; /* words of TextLine */
   int      outline;        /* draw an outline?  */ 
   int      cursor;         /* location of cursor (if selected) */
@@ -179,6 +179,6 @@
   double   start, slope;   /* zero, range for cmap to pixels */
   Coords   coords;
-  char     file[1024];     /* name of file */
-  char     name[1024];     /* name of buffer */
+  char     file[LONG_LINE_LENGTH];     /* name of file */
+  char     name[LONG_LINE_LENGTH];     /* name of buffer */
 } KapaImageChannel;
 
Index: trunk/Ohana/src/kapa2/src/UpdateStatusBox.c
===================================================================
--- trunk/Ohana/src/kapa2/src/UpdateStatusBox.c	(revision 40500)
+++ trunk/Ohana/src/kapa2/src/UpdateStatusBox.c	(revision 40501)
@@ -1,9 +1,10 @@
 # include "Ximage.h"
 
+# define MY_LONG_LINE (LONG_LINE_LENGTH + 128)
 void UpdateStatusBox (Graphic *graphic, KapaImageWidget *image, double x, double y, double z, int mode) {
 
   int textpad;
   double ra, dec; 
-  char line[100];
+  char line[MY_LONG_LINE];
 
   XY_to_RD (&ra, &dec, x, y, &image[0].image[0].coords);
@@ -19,17 +20,17 @@
 		    image[0].text_x, image[0].text_y, image[0].text_dx, image[0].text_dy);
   
-    bzero (line, 100);
-    snprintf (line, 100, "(%d x %d) @ %d   ch: %d                                     ", 
+    bzero (line, MY_LONG_LINE);
+    snprintf (line, MY_LONG_LINE, "(%d x %d) @ %d   ch: %d                                     ", 
 	      image[0].picture.dx, image[0].picture.dy, image[0].picture.expand, image[0].currentChannel+1); 
     XDrawString (graphic[0].display, graphic[0].window, graphic[0].gc, 
 		 image[0].text_x + PAD1, image[0].text_y + 4*textpad + 4*PAD1, line, 25);
     
-    bzero (line, 100);
-    snprintf (line, 100, "%-25s", image[0].image[0].file); 
+    bzero (line, MY_LONG_LINE);
+    snprintf (line, MY_LONG_LINE, "%-25s", image[0].image[0].file); 
     XDrawString (graphic[0].display, graphic[0].window, graphic[0].gc, 
 		 image[0].text_x + PAD1, image[0].text_y + 5*textpad + 5*PAD1, line, strlen(line));
     
-    bzero (line, 100);
-    snprintf (line, 100, "(%s)                                          ", image[0].image[0].name); 
+    bzero (line, MY_LONG_LINE);
+    snprintf (line, MY_LONG_LINE, "(%s)                                          ", image[0].image[0].name); 
     XDrawString (graphic[0].display, graphic[0].window, graphic[0].gc, 
 		 image[0].text_x + PAD1, image[0].text_y + 6*textpad + 6*PAD1, line, 25);
@@ -42,24 +43,24 @@
     XSetForeground (graphic[0].display, graphic[0].gc, graphic[0].fore);
   }
-  bzero (line, 100);
+  bzero (line, MY_LONG_LINE);
 
   if (image[0].HexValue) {
-      snprintf (line, 100, "%04x", (int) z);
+      snprintf (line, MY_LONG_LINE, "%04x", (int) z);
   } else {
-      snprintf (line, 100, "%22.3f", z);
+      snprintf (line, MY_LONG_LINE, "%22.3f", z);
   }
   XDrawString (graphic[0].display, graphic[0].window, graphic[0].gc, 
 	       image[0].text_x + PAD1, image[0].text_y + textpad + PAD1, line, strlen(line));
   
-  bzero (line, 100);
-  snprintf (line, 100, "%10.2f %10.2f", x, y);
+  bzero (line, MY_LONG_LINE);
+  snprintf (line, MY_LONG_LINE, "%10.2f %10.2f", x, y);
   XDrawString (graphic[0].display, graphic[0].window, graphic[0].gc, 
 	       image[0].text_x + PAD1, image[0].text_y + 2*textpad + 2*PAD1, line, strlen(line));
   
-  bzero (line, 100);
+  bzero (line, MY_LONG_LINE);
   if (image[0].DecimalDegrees) {
-    snprintf (line, 100, "%10.6f %10.6f", ra, dec); 
+    snprintf (line, MY_LONG_LINE, "%10.6f %10.6f", ra, dec); 
   } else {
-    hh_hms (line, ra, dec, ':', 100);
+    hh_hms (line, ra, dec, ':', MY_LONG_LINE);
   }
 
