Index: trunk/Ohana/src/kapa2/include/kii.struct.h
===================================================================
--- trunk/Ohana/src/kapa2/include/kii.struct.h	(revision 21060)
+++ trunk/Ohana/src/kapa2/include/kii.struct.h	(revision 21153)
@@ -29,7 +29,7 @@
   int      width, height;
   char    *bitmap;          /* picture on button */
-  int    (*function_1) ();  /* mouse_button 1 function */
-  int    (*function_2) ();  /* mouse_button 2 function */
-  int    (*function_3) ();  /* mouse_button 3 function */
+  int    (*function_1) (void);  /* mouse_button 1 function */
+  int    (*function_2) (void);  /* mouse_button 2 function */
+  int    (*function_3) (void);  /* mouse_button 3 function */
 } Button;
 
@@ -41,5 +41,5 @@
   int      outline;        /* draw an outline?  */ 
   int      cursor;         /* location of cursor (if selected) */
-  int    (*function) ();   /* textline function */
+  int    (*function) (void);   /* textline function */
 } TextLine;
 
@@ -54,5 +54,5 @@
   int      cursor_x;       /* location of cursor (if selected) */
   int      cursor_y;       /* location of cursor (if selected) */
-  int    (*function) ();   /* textline function */
+  int    (*function) (void);   /* textline function */
 } TextBox;
 
Index: trunk/Ohana/src/kapa2/include/prototypes.h
===================================================================
--- trunk/Ohana/src/kapa2/include/prototypes.h	(revision 21060)
+++ trunk/Ohana/src/kapa2/include/prototypes.h	(revision 21153)
@@ -4,6 +4,6 @@
 void          SetUpGraphic        PROTO((int *argc, char **argv));
 void          DefineLayout        PROTO((int, char **));
-int	      EventLoop		  PROTO(());
-void	      CloseDisplay	  PROTO(());
+int	      EventLoop		  PROTO((void));
+void	      CloseDisplay	  PROTO((void));
 
 /* SetUpGraphic */
@@ -43,7 +43,7 @@
 /* EventLoop */
 int           PScommand           PROTO((int sock));
-int           CheckPipe           PROTO(());
+int           CheckPipe           PROTO((void));
 int           Reconfig            PROTO((XEvent *event));
-void          Refresh             PROTO(());
+void          Refresh             PROTO((void));
 
 /* CheckPipe */
@@ -79,18 +79,18 @@
 
 /* Section Utilities */
-Section      *InitSection	  PROTO(());
+Section      *InitSection	  PROTO((void));
 void          FreeSection	  PROTO((Section *section));
-void          FreeSections	  PROTO(());
+void          FreeSections	  PROTO((void));
 Section      *AddSection	  PROTO((char *name, float x, float y, float dx, float dy));
 int           DelSection	  PROTO((char *name));
 int           GetSectionByName	  PROTO((char *name));
-int           GetNumberOfSections PROTO(());
+int           GetNumberOfSections PROTO((void));
 Section      *GetSectionByNumber  PROTO((int N));
-Section      *GetActiveSection	  PROTO(());
+Section      *GetActiveSection	  PROTO((void));
 int           SetActiveSectionByNumber PROTO((int N));
 int           ListSection         PROTO((int sock));
 void          SetSectionSizes     PROTO((Section *section));
 
-KapaGraphWidget *InitGraph        PROTO(());
+KapaGraphWidget *InitGraph        PROTO((void));
 void          DrawGraph           PROTO((KapaGraphWidget *graph));
 void          SetGraphSize        PROTO((Section *section));
@@ -131,5 +131,5 @@
 void	      bDrawTick		  PROTO((double fx, double fy, double dfx, double dfy, int P, double min, double max, double value, int IsLabel, int IsMajor, int naxis));
 void	      bDrawClipLine	  PROTO((double x0, double y0, double x1, double y1, double X0, double Y1, double X1, double Y0));
-bDrawBuffer  *bDrawIt		  PROTO(());
+bDrawBuffer  *bDrawIt		  PROTO((void));
 void          bDrawGraph          PROTO((KapaGraphWidget *graph));
 
@@ -137,12 +137,12 @@
 int           LastEvent           PROTO((Display *display, int type, XEvent *event));
 void	      FreeObjectData	  PROTO((Gobjects *object));
-void	      FlushDisplay	  PROTO(());
+void	      FlushDisplay	  PROTO((void));
 unsigned long GetColor            PROTO((Display *display, char *name, Colormap colormap, unsigned long default_color));
 void          QuitX               PROTO((Display *display, char *message));
-Graphic      *GetGraphic          PROTO(());
+Graphic      *GetGraphic          PROTO((void));
 int           GetPixelCount       PROTO((int sock));
 
-int           Center              PROTO(());
-int           Parity              PROTO(());
+int           Center              PROTO((int sock));
+int           Parity              PROTO((int sock));
 void          SetColorScale       PROTO((Graphic *graphic, KapaImageWidget *image));
 void          SetColorScale1D     PROTO((Graphic *graphic, KapaImageWidget *image));
@@ -155,5 +155,5 @@
 int           LoadPicture         PROTO((int sock));
 
-KapaImageWidget *InitImageWidget  PROTO(());
+KapaImageWidget *InitImageWidget  PROTO((void));
 int           InitImageChannel    PROTO((KapaImageChannel *channel));
 void          FreeImage           PROTO((KapaImageWidget *image));
@@ -161,5 +161,5 @@
 
 void          InitButtonSize      PROTO((Button *button, int width, int height, char *bitmap));
-void          InitButtonFunc      PROTO((Button *button, int (*function)()));
+void          InitButtonFunc      PROTO((Button *button, int (*function)(Graphic *graphic, KapaImageWidget *image)));
 void          DrawImage           PROTO((KapaImageWidget *image));
 void          DrawButton          PROTO((Graphic *graphic, Button *button));
@@ -232,10 +232,10 @@
 // void 	      CreateZoom32 (KapaImageWidget *image, Graphic *graphic, double x, double y);
 
-int  	      GetActiveSocket ();
+int  	      GetActiveSocket (void);
 void 	      InvertButton (Graphic *graphic, Button *button);
 void 	      bDrawOverlay (KapaImageWidget *image, int N);
 
 /* color cube tools */
-CCNode *CCNodeAlloc ();
+CCNode *CCNodeAlloc (void);
 CCNode *CCFindChild (CCNode *node, float x, float y, float z);
 int CCSplitNode (CCNode *node);
@@ -253,3 +253,3 @@
 
 int SetColorScale3D_CC (Graphic *graphic, KapaImageWidget *image);
-int SetColorCubeHistogram ();
+int SetColorCubeHistogram (void);
Index: trunk/Ohana/src/kapa2/include/structures.h
===================================================================
--- trunk/Ohana/src/kapa2/include/structures.h	(revision 21060)
+++ trunk/Ohana/src/kapa2/include/structures.h	(revision 21153)
@@ -78,5 +78,5 @@
   int      cursor_x;       /* location of cursor (if selected) */
   int      cursor_y;       /* location of cursor (if selected) */
-  int    (*function) ();   /* textline function */
+  int    (*function) (void);   /* textline function */
 } TextBox;
 
Index: trunk/Ohana/src/kapa2/src/ButtonFunctions.c
===================================================================
--- trunk/Ohana/src/kapa2/src/ButtonFunctions.c	(revision 21060)
+++ trunk/Ohana/src/kapa2/src/ButtonFunctions.c	(revision 21153)
@@ -102,5 +102,5 @@
   image[0].DecimalDegrees = image[0].DecimalDegrees ^ TRUE;
   StatusBox (graphic, image);
-  FlushDisplay (graphic[0].display);
+  FlushDisplay ();
   return (TRUE);
 
Index: trunk/Ohana/src/kapa2/src/CheckVisual.c
===================================================================
--- trunk/Ohana/src/kapa2/src/CheckVisual.c	(revision 21060)
+++ trunk/Ohana/src/kapa2/src/CheckVisual.c	(revision 21153)
@@ -34,4 +34,6 @@
   }
   
+// skip the default and the PseudoColor visuals, go for TrueColor first
+# if (0)
   /* check default visual first */ 
   for (i = 0; (i < Nfound) && (graphic[0].visual != visual_list[i].visual); i++);
@@ -40,8 +42,10 @@
     exit (0);
   }
+# endif
 
   // set these based on selected visual
   isColor = isDefault = isDynamic = FALSE;
 
+# if (0)
   // attempt to select the most desirable type of visual: Default as PseudoColor (XXX is it still true?)
   if (DEBUG) fprintf (stderr, "default visual class is %d\n", visual_list[i].class);
@@ -52,4 +56,16 @@
     goto test_pixels;
   }
+# endif
+
+  // attempt to select the most desirable type of visual: TrueColor (XXX is it still true?)
+  for (i = 0; (i < Nfound) && (visual_list[i].class != TrueColor); i++);
+  if (i != Nfound) {
+    isColor = TRUE;
+    if (DEBUG) fprintf (stderr, "visual class is %d\n", visual_list[i].class);
+    isDefault = (graphic[0].visual == visual_list[i].visual);
+    graphic[0].visual = visual_list[i].visual;
+    graphic[0].visualclass = FALSE;
+    goto test_pixels;
+  }
 
   // attempt to select the most desirable type of visual: PseudoColor (XXX is it still true?)
@@ -72,15 +88,4 @@
     graphic[0].visual = visual_list[i].visual;
     graphic[0].visualclass = TRUE;
-    goto test_pixels;
-  }
-
-  // attempt to select the most desirable type of visual: TrueColor (XXX is it still true?)
-  for (i = 0; (i < Nfound) && (visual_list[i].class != TrueColor); i++);
-  if (i != Nfound) {
-    isColor = TRUE;
-    if (DEBUG) fprintf (stderr, "visual class is %d\n", visual_list[i].class);
-    isDefault = (graphic[0].visual == visual_list[i].visual);
-    graphic[0].visual = visual_list[i].visual;
-    graphic[0].visualclass = FALSE;
     goto test_pixels;
   }
Index: trunk/Ohana/src/kapa2/src/DefineSection.c
===================================================================
--- trunk/Ohana/src/kapa2/src/DefineSection.c	(revision 21060)
+++ trunk/Ohana/src/kapa2/src/DefineSection.c	(revision 21153)
@@ -34,5 +34,5 @@
   if (MoveSection) {
     SetSectionSizes (section);
-    Refresh (1);
+    Refresh ();
   }
 
Index: trunk/Ohana/src/kapa2/src/EraseCurrentPlot.c
===================================================================
--- trunk/Ohana/src/kapa2/src/EraseCurrentPlot.c	(revision 21060)
+++ trunk/Ohana/src/kapa2/src/EraseCurrentPlot.c	(revision 21153)
@@ -15,5 +15,5 @@
   
   if (USE_XWINDOW) XClearWindow (graphic->display, graphic->window);
-  Refresh (1);
+  Refresh ();
 
   return (TRUE);
Index: trunk/Ohana/src/kapa2/src/ErasePlots.c
===================================================================
--- trunk/Ohana/src/kapa2/src/ErasePlots.c	(revision 21060)
+++ trunk/Ohana/src/kapa2/src/ErasePlots.c	(revision 21153)
@@ -18,5 +18,5 @@
 
   if (USE_XWINDOW) XClearWindow (graphic->display, graphic->window);
-  Refresh (1);
+  Refresh ();
 
   return (TRUE);
Index: trunk/Ohana/src/kapa2/src/EraseSections.c
===================================================================
--- trunk/Ohana/src/kapa2/src/EraseSections.c	(revision 21060)
+++ trunk/Ohana/src/kapa2/src/EraseSections.c	(revision 21153)
@@ -11,5 +11,5 @@
 
   if (USE_XWINDOW) XClearWindow (graphic->display, graphic->window);
-  Refresh (1);
+  Refresh ();
 
   return (TRUE);
Index: trunk/Ohana/src/kapa2/src/EventLoop.c
===================================================================
--- trunk/Ohana/src/kapa2/src/EventLoop.c	(revision 21060)
+++ trunk/Ohana/src/kapa2/src/EventLoop.c	(revision 21153)
@@ -25,5 +25,5 @@
   display = graphic->display;
   
-  if (USE_XWINDOW) Refresh (1);
+  if (USE_XWINDOW) Refresh ();
 
   status = TRUE;
@@ -46,5 +46,5 @@
     if (LastEvent (display, ConfigureNotify, &event)) Reconfig (&event);
     if (LastEvent (display, CirculateNotify, &event)) Reconfig (&event);
-    if (LastEvent (display, Expose,          &event)) Refresh (1);
+    if (LastEvent (display, Expose,          &event)) Refresh ();
     if (LastEvent (display, MappingNotify,   &event)) XRefreshKeyboardMapping ((XMappingEvent *) &event);
     if (LastEvent (display, MotionNotify,    &event)) UpdatePointer (graphic, (XMotionEvent *) &event);
Index: trunk/Ohana/src/kapa2/src/FlushDisplay.c
===================================================================
--- trunk/Ohana/src/kapa2/src/FlushDisplay.c	(revision 21060)
+++ trunk/Ohana/src/kapa2/src/FlushDisplay.c	(revision 21153)
@@ -5,5 +5,5 @@
 # define DTIME(A,B) ((A.tv_sec - B.tv_sec) + 1e-6*(A.tv_usec - B.tv_usec))
 
-void FlushDisplay () {
+void FlushDisplay (void) {
 
   struct timeval now;
Index: trunk/Ohana/src/kapa2/src/Image.c
===================================================================
--- trunk/Ohana/src/kapa2/src/Image.c	(revision 21060)
+++ trunk/Ohana/src/kapa2/src/Image.c	(revision 21153)
@@ -190,5 +190,5 @@
   }
 
-  FlushDisplay (graphic[0].display);
+  FlushDisplay ();
 }
 
Index: trunk/Ohana/src/kapa2/src/InvertButton.c
===================================================================
--- trunk/Ohana/src/kapa2/src/InvertButton.c	(revision 21060)
+++ trunk/Ohana/src/kapa2/src/InvertButton.c	(revision 21153)
@@ -12,5 +12,5 @@
 
   DrawButton (graphic, button);
-  FlushDisplay (graphic[0].display);
+  FlushDisplay ();
   
   graphic[0].fore = fore;
Index: trunk/Ohana/src/kapa2/src/LoadFrame.c
===================================================================
--- trunk/Ohana/src/kapa2/src/LoadFrame.c	(revision 21060)
+++ trunk/Ohana/src/kapa2/src/LoadFrame.c	(revision 21153)
@@ -81,5 +81,5 @@
     }
     if (USE_XWINDOW) XClearWindow (graphic.display, graphic.window);
-    Refresh (1);
+    Refresh ();
   } else {
     FlushDisplay ();
Index: trunk/Ohana/src/kapa2/src/MapWindow.c
===================================================================
--- trunk/Ohana/src/kapa2/src/MapWindow.c	(revision 21060)
+++ trunk/Ohana/src/kapa2/src/MapWindow.c	(revision 21153)
@@ -6,4 +6,4 @@
   XMapRaised (graphic->display, graphic->window);
   XMapSubwindows (graphic->display, graphic->window);
-  FlushDisplay (graphic);
+  FlushDisplay ();
 }
Index: trunk/Ohana/src/kapa2/src/Reconfig.c
===================================================================
--- trunk/Ohana/src/kapa2/src/Reconfig.c	(revision 21060)
+++ trunk/Ohana/src/kapa2/src/Reconfig.c	(revision 21153)
@@ -29,5 +29,5 @@
 
   if (USE_XWINDOW) XClearWindow (graphic->display, graphic->window);
-  Refresh (1);
+  Refresh ();
 
   return (TRUE);
Index: trunk/Ohana/src/kapa2/src/Refresh.c
===================================================================
--- trunk/Ohana/src/kapa2/src/Refresh.c	(revision 21060)
+++ trunk/Ohana/src/kapa2/src/Refresh.c	(revision 21153)
@@ -1,5 +1,5 @@
 # include "Ximage.h"
 
-void Refresh () {
+void Refresh (void) {
 
   int i, Nsection;
Index: trunk/Ohana/src/kapa2/src/Resize.c
===================================================================
--- trunk/Ohana/src/kapa2/src/Resize.c	(revision 21060)
+++ trunk/Ohana/src/kapa2/src/Resize.c	(revision 21153)
@@ -34,5 +34,5 @@
 
   if (USE_XWINDOW) XClearWindow (graphic->display, graphic->window);
-  Refresh (1);
+  Refresh ();
 
   return (TRUE);
Index: trunk/Ohana/src/kapa2/src/Sections.c
===================================================================
--- trunk/Ohana/src/kapa2/src/Sections.c	(revision 21060)
+++ trunk/Ohana/src/kapa2/src/Sections.c	(revision 21153)
@@ -177,5 +177,5 @@
       sections[N] = sections[N+1];
       sections[N+1] = tmpSection;
-      Refresh (1);
+      Refresh ();
       return (TRUE);
   }
@@ -187,5 +187,5 @@
       sections[N] = sections[N-1];
       sections[N-1] = tmpSection;
-      Refresh (1);
+      Refresh ();
       return (TRUE);
   }
@@ -199,5 +199,5 @@
       }
       sections[i] = tmpSection;
-      Refresh (1);
+      Refresh ();
       return (TRUE);
   }
@@ -211,5 +211,5 @@
       }
       sections[i] = tmpSection;
-      Refresh (1);
+      Refresh ();
       return (TRUE);
   }
Index: trunk/Ohana/src/kapa2/src/SetGraphData.c
===================================================================
--- trunk/Ohana/src/kapa2/src/SetGraphData.c	(revision 21060)
+++ trunk/Ohana/src/kapa2/src/SetGraphData.c	(revision 21153)
@@ -73,5 +73,5 @@
 
   if (USE_XWINDOW) XClearWindow (graphic->display, graphic->window);
-  Refresh (1);
+  Refresh ();
 
   return (TRUE);  
Index: trunk/Ohana/src/kapa2/src/SetGraphStyle.c
===================================================================
--- trunk/Ohana/src/kapa2/src/SetGraphStyle.c	(revision 21060)
+++ trunk/Ohana/src/kapa2/src/SetGraphStyle.c	(revision 21153)
@@ -55,5 +55,5 @@
 
   if (USE_XWINDOW) XClearWindow (graphic->display, graphic->window);
-  Refresh (1);
+  Refresh ();
 
   return (TRUE);  
Index: trunk/Ohana/src/kapa2/src/SetLimits.c
===================================================================
--- trunk/Ohana/src/kapa2/src/SetLimits.c	(revision 21060)
+++ trunk/Ohana/src/kapa2/src/SetLimits.c	(revision 21153)
@@ -33,5 +33,5 @@
 
   if (USE_XWINDOW) XClearWindow (graphic->display, graphic->window);
-  Refresh (1);
+  Refresh ();
 
   return (TRUE);  
Index: trunk/Ohana/src/kapa2/src/SetUpGraphic.c
===================================================================
--- trunk/Ohana/src/kapa2/src/SetUpGraphic.c	(revision 21060)
+++ trunk/Ohana/src/kapa2/src/SetUpGraphic.c	(revision 21153)
@@ -44,5 +44,4 @@
   LoadFont (graphic, argc, argv, "fixed"); 
 
-  // FlushDisplay (graphic);
   XSetWindowBackground (graphic->display, graphic->window, graphic->back);
 
Index: trunk/Ohana/src/kapa2/src/TopWindow.c
===================================================================
--- trunk/Ohana/src/kapa2/src/TopWindow.c	(revision 21060)
+++ trunk/Ohana/src/kapa2/src/TopWindow.c	(revision 21153)
@@ -15,4 +15,3 @@
   MakeCursor (graphic, DEFAULT_CURSOR);
   XFreeCursor (graphic->display, graphic->cursor);
-  // FlushDisplay (graphic);
 }
