# include "Ximage.h"

int LoadLabels () {
  
  char *c, *label;
  int mode, size, Nbytes;
  Layout *layout;
  
  layout = &section[TheSection];
  
  fcntl (sock, F_SETFL, !O_NONBLOCK);  
  
  KiiScanMessage (sock, "%d", &mode);
  label = KiiRecvData (sock);

  bzero (layout[0].label[mode].text, LABEL_MAXLEN);

  Nbytes = MIN (strlen(label), LABEL_MAXLEN - 1);
  strncpy (layout[0].label[mode].text, label, Nbytes);
  label[Nbytes] = 0;

  fcntl (sock, F_SETFL, O_NONBLOCK);  
  
  c = GetRotFont (&size);
  layout[0].label[mode].size = size;
  strcpy (layout[0].label[mode].font, c);
  DrawLabels (layout);
  
  FlushDisplay ();
  
  return (TRUE);
  
}

/*
  layout[0].X = 0;
  layout[0].Y = 0;
  layout[0].expand = 1;
  */


