Index: /branches/kapa-mods-2007-05/Ohana/Makefile.in
===================================================================
--- /branches/kapa-mods-2007-05/Ohana/Makefile.in	(revision 13404)
+++ /branches/kapa-mods-2007-05/Ohana/Makefile.in	(revision 13405)
@@ -37,6 +37,5 @@
 imclean     \
 imregister  \
-kapa        \
-kii         \
+kapa2       \
 misc        \
 mosastro    \
@@ -96,12 +95,10 @@
 mana:
 	make libs
-	make kii.install
-	make kapa.install
+	make kapa2.install
 	cd src/opihi; make mana.install && exit
 
 dvoshell:
 	make libs
-	make kii.install
-	make kapa.install
+	make kapa2.install
 	cd src/opihi; make dvo.install && exit
 
Index: /branches/kapa-mods-2007-05/Ohana/src/gastro/Makefile
===================================================================
--- /branches/kapa-mods-2007-05/Ohana/src/gastro/Makefile	(revision 13404)
+++ /branches/kapa-mods-2007-05/Ohana/src/gastro/Makefile	(revision 13405)
@@ -15,5 +15,5 @@
 FULL_CFLAGS   = $(BASE_CFLAGS)
 FULL_CPPFLAGS = $(BASE_CPPFLAGS)
-FULL_LDFLAGS  = -ldvo -lFITS -lohana $(BASE_LDFLAGS)
+FULL_LDFLAGS  = -lkapa -ldvo -lFITS -lohana $(BASE_LDFLAGS)
 
 gastro: $(BIN)/gastro.$(ARCH)
Index: /branches/kapa-mods-2007-05/Ohana/src/gastro2/Makefile
===================================================================
--- /branches/kapa-mods-2007-05/Ohana/src/gastro2/Makefile	(revision 13404)
+++ /branches/kapa-mods-2007-05/Ohana/src/gastro2/Makefile	(revision 13405)
@@ -15,5 +15,5 @@
 FULL_CFLAGS   = $(BASE_CFLAGS)
 FULL_CPPFLAGS = $(BASE_CPPFLAGS)
-FULL_LDFLAGS  = -ldvo -lFITS -lohana $(BASE_LDFLAGS)
+FULL_LDFLAGS  = -lkapa -ldvo -lFITS -lohana $(BASE_LDFLAGS)
 
 gastro2: $(BIN)/gastro2.$(ARCH)
Index: /branches/kapa-mods-2007-05/Ohana/src/kapa2/Makefile
===================================================================
--- /branches/kapa-mods-2007-05/Ohana/src/kapa2/Makefile	(revision 13404)
+++ /branches/kapa-mods-2007-05/Ohana/src/kapa2/Makefile	(revision 13405)
@@ -49,4 +49,5 @@
 $(SRC)/Graphs.$(ARCH).o                   $(SRC)/SetGraphSize.$(ARCH).o       \
 $(SRC)/Resize.$(ARCH).o                   $(SRC)/ErasePlots.$(ARCH).o         \
+$(SRC)/EraseImage.$(ARCH).o         \
 $(SRC)/EraseCurrentPlot.$(ARCH).o         $(SRC)/EraseSections.$(ARCH).o      \
 $(SRC)/SetSection.$(ARCH).o		  $(SRC)/DefineSection.$(ARCH).o      \
Index: /branches/kapa-mods-2007-05/Ohana/src/kapa2/src/Sections.c
===================================================================
--- /branches/kapa-mods-2007-05/Ohana/src/kapa2/src/Sections.c	(revision 13404)
+++ /branches/kapa-mods-2007-05/Ohana/src/kapa2/src/Sections.c	(revision 13405)
@@ -158,4 +158,5 @@
 int MoveSection (int sock) {
 
+  int i, N;
   char name[128];
   char direction[16];
Index: /branches/kapa-mods-2007-05/Ohana/src/libkapa/include/kapa.h
===================================================================
--- /branches/kapa-mods-2007-05/Ohana/src/libkapa/include/kapa.h	(revision 13404)
+++ /branches/kapa-mods-2007-05/Ohana/src/libkapa/include/kapa.h	(revision 13405)
@@ -154,5 +154,5 @@
 int KapaSelectSection (int fd, char *name);
 int KapaGetSection (int fd, char *name);
-int KapaMoveSection (int fd, KapaSection *section, char *direction);
+int KapaMoveSection (int fd, char *name, char *direction);
 
 /* KapaColors */
Index: /branches/kapa-mods-2007-05/Ohana/src/libkapa/src/KapaWindow.c
===================================================================
--- /branches/kapa-mods-2007-05/Ohana/src/libkapa/src/KapaWindow.c	(revision 13404)
+++ /branches/kapa-mods-2007-05/Ohana/src/libkapa/src/KapaWindow.c	(revision 13405)
@@ -2,4 +2,6 @@
 
 int KiiCenter (int fd, double x, double y, int zoom) {
+
+  char word[5];
 
   KiiSendCommand (fd, 4, "CENT");
@@ -16,4 +18,6 @@
 int KiiResize (int fd, int Nx, int Ny) {
 
+  char word[5];
+
   KiiSendCommand (fd, 4, "RSIZ");
   KiiSendMessage (fd, "%d %d", Nx, Ny); 
@@ -29,6 +33,7 @@
 int KapaBox (int fd, Graphdata *graphdata) {
 
+  char word[5];
+
   KiiSendCommand (fd, 4, "DBOX");
-
   KiiSendMessage (fd, "%12.6g %12.6g %12.6g %12.6g", 
 		    graphdata[0].xmin, graphdata[0].xmax, graphdata[0].ymin, graphdata[0].ymax);
@@ -46,4 +51,6 @@
 int KapaClearCurrentPlot (int fd) {
   
+  char word[5];
+
   KiiSendCommand (fd, 4, "ERSC");
   KiiScanCommand (fd, 4, "%s", word);
@@ -57,4 +64,6 @@
 int KapaClearPlots (int fd) {
   
+  char word[5];
+
   KiiSendCommand (fd, 4, "ERSP");
   KiiScanCommand (fd, 4, "%s", word);
@@ -68,4 +77,6 @@
 int KapaClearSections (int fd) {
   
+  char word[5];
+
   KiiSendCommand (fd, 4, "ERSS");
   KiiScanCommand (fd, 4, "%s", word);
@@ -79,4 +90,6 @@
 int KapaClearImage (int fd) {
   
+  char word[5];
+
   KiiSendCommand (fd, 4, "ERSI");
   KiiScanCommand (fd, 4, "%s", word);
@@ -116,4 +129,6 @@
 int KapaPrepPlot (int fd, int Npts, Graphdata *graphmode) {
 
+  char word[5];
+
   /* tell kapa to look for the incoming image */
   KiiSendCommand (fd, 4, "PLOT"); 
@@ -149,4 +164,6 @@
 int KapaSetFont (int fd, char *name, int size) {
 
+  char word[5];
+
   KiiSendCommand (fd, 4, "FONT");
   KiiSendCommand (fd, 16, "%s", name);
@@ -164,4 +181,6 @@
 int KapaSendLabel (int fd, char *string, int mode) {
   
+  char word[5];
+
   KiiSendCommand (fd, 4, "LABL");
   KiiSendMessage (fd, "%6d", mode);
@@ -179,4 +198,6 @@
 int KapaSendTextline (int fd, char *string, float x, float y, float angle) {
   
+  char word[5];
+
   KiiSendCommand (fd, 4, "PTXT");
   KiiSendMessage (fd, "%f %f %f", x, y, angle);
@@ -194,4 +215,6 @@
 int KapaSetLimits (int fd, Graphdata *graphmode) {
 
+  char word[5];
+
   KiiSendCommand (fd, 4, "SLIM");
   KiiSendMessage (fd, "%g %g %g %g ", graphmode[0].xmin, graphmode[0].xmax, graphmode[0].ymin, graphmode[0].ymax);
@@ -209,6 +232,8 @@
 int KapaGetLimits (int fd, float *dx, float *dy) {
 
-  KiiSendCommand (kapa, 4, "LIMS"); 
-  KiiScanMessage (kapa, "%lf %lf", dx, dy); 
+  char word[5];
+
+  KiiSendCommand (fd, 4, "LIMS"); 
+  KiiScanMessage (fd, "%lf %lf", dx, dy); 
 
   KiiScanCommand (fd, 4, "%s", word);
@@ -222,4 +247,6 @@
 
 int KapaSetSection (int fd, KapaSection *section) {
+
+  char word[5];
 
   KiiSendCommand (fd, 4, "DSEC");
@@ -242,4 +269,6 @@
 int KapaMoveSection (int fd, char *name, char *direction) {
 
+  char word[5];
+
   if (!strcasecmp(direction, "up")) goto valid;
   if (!strcasecmp(direction, "down")) goto valid;
@@ -264,4 +293,6 @@
 int KapaSelectSection (int fd, char *name) {
 
+  char word[5];
+
   KiiSendCommand (fd, 4, "SSEC");
   KiiSendMessage (fd, "%s", name);
@@ -278,4 +309,6 @@
 int KapaGetSection (int fd, char *name) {
 
+  char word[5];
+
   KiiSendCommand (fd, 4, "LSEC");
   KiiSendMessage (fd, "%s", name);
Index: /branches/kapa-mods-2007-05/Ohana/src/libkapa/src/KiiConvert.c
===================================================================
--- /branches/kapa-mods-2007-05/Ohana/src/libkapa/src/KiiConvert.c	(revision 13404)
+++ /branches/kapa-mods-2007-05/Ohana/src/libkapa/src/KiiConvert.c	(revision 13405)
@@ -3,5 +3,5 @@
 int KiiJPEG (int fd, const char *filename) {
 
-  char buffer[20];
+  char buffer[20], word[5];
 
   KiiSendCommand (fd, 4, "JPEG");
@@ -19,5 +19,5 @@
 int KapaPNG (int fd, const char *filename) {
 
-  char buffer[20];
+  char buffer[20], word[5];
 
   KiiSendCommand (fd, 4, "PNGF");
@@ -35,5 +35,5 @@
 int KapaPPM (int fd, const char *filename) {
 
-  char buffer[20];
+  char buffer[20], word[5];
 
   KiiSendCommand (fd, 4, "PPMF");
@@ -51,5 +51,5 @@
 int KiiPS (int fd, const char *filename, int scaleMode, int pageMode, char *pagename) {
 
-  char buffer[20];
+  char buffer[20], word[5];
 
   /* the default operation */
Index: /branches/kapa-mods-2007-05/Ohana/src/libkapa/src/KiiCursor.c
===================================================================
--- /branches/kapa-mods-2007-05/Ohana/src/libkapa/src/KiiCursor.c	(revision 13404)
+++ /branches/kapa-mods-2007-05/Ohana/src/libkapa/src/KiiCursor.c	(revision 13405)
@@ -2,4 +2,6 @@
 
 int KiiCursorOn (int fd) {
+  char word[5];
+
   KiiSendCommand (fd, 4, "CURS");
   KiiScanCommand (fd, 4, "%s", word);
@@ -12,4 +14,6 @@
 
 int KiiCursorOff (int fd) {
+  char word[5];
+
   KiiSendCommand (fd, 4, "NCUR");
   KiiScanCommand (fd, 4, "%s", word);
Index: /branches/kapa-mods-2007-05/Ohana/src/libkapa/src/KiiOverlay.c
===================================================================
--- /branches/kapa-mods-2007-05/Ohana/src/libkapa/src/KiiOverlay.c	(revision 13404)
+++ /branches/kapa-mods-2007-05/Ohana/src/libkapa/src/KiiOverlay.c	(revision 13405)
@@ -53,5 +53,5 @@
 
   int i, n, Nline;
-  char *buffer, *type;
+  char *buffer, *type, word[5];
 
   KiiSelectOverlay (overname, &n);
@@ -99,4 +99,5 @@
 
   int n;
+  char word[5];
 
   KiiSelectOverlay (overname, &n);
@@ -116,4 +117,5 @@
 
   int n;
+  char word[5];
 
   KiiSelectOverlay (overname, &n);
Index: /branches/kapa-mods-2007-05/Ohana/src/libkapa/src/KiiPicture.c
===================================================================
--- /branches/kapa-mods-2007-05/Ohana/src/libkapa/src/KiiPicture.c	(revision 13404)
+++ /branches/kapa-mods-2007-05/Ohana/src/libkapa/src/KiiPicture.c	(revision 13405)
@@ -6,5 +6,5 @@
   int Npix, Ncolors, NNcolors, size;
   float *in, min, max;
-  char *out, *outbuffer, *root;
+  char *out, *outbuffer, *root, word[5];
   double a1, a2;
 
@@ -72,5 +72,5 @@
   float *in, min, max;
   char *out, *outbuffer, *root;
-  char buffer[1024];
+  char buffer[1024], word[5];
   double a1, a2;
 
