Index: trunk/Ohana/src/kapa/event/SetSection.c
===================================================================
--- trunk/Ohana/src/kapa/event/SetSection.c	(revision 4769)
+++ trunk/Ohana/src/kapa/event/SetSection.c	(revision 5852)
@@ -1,23 +1,14 @@
 # include "Ximage.h"
-# define SCAN \
-status = read (sock, buffer, 16); \
-buffer[16] = 0; \
-sscanf (buffer, "%*s %d", &Nbytes); \
-status = read (sock, buffer, Nbytes); \
-buffer[status] = 0;
 
 int SetSection (int SwitchSection) {
   
-  int i, status, Nbytes, NewSection, ThisSection, MoveSection;
-  char buffer[128], name[128];
+  int i, NewSection, ThisSection, MoveSection;
+  char name[128];
   double x, y, dx, dy;
 
-  SCAN;
-
   if (SwitchSection) {
-    sscanf (buffer, "%s", name);
+    KiiScanMessage (sock, "%s", name);
   } else {
-    sscanf (buffer, "%s %lf %lf %lf %lf", 
-	    name, &x, &y, &dx, &dy);
+    KiiScanMessage (sock, "%s %lf %lf %lf %lf", name, &x, &y, &dx, &dy);
   }    
 
@@ -92,10 +83,8 @@
 int ListSection () {
   
-  int i, status, Nbytes, ThisSection;
-  char buffer[128], name[128];
+  int i, ThisSection;
+  char name[128];
 
-  SCAN;
-
-  sscanf (buffer, "%s", name);
+  KiiScanMessage (sock, "%s", name);
 
   if (!strcmp (name, "*")) {
