# include "Ximage.h"

int LoadLabels () {
  
  char buffer[256], *c;
  int status, Nbytes, mode, size;
  Layout *layout;
  
  layout = &section[TheSection];
  
  fcntl (sock, F_SETFL, !O_NONBLOCK);  
  
  status = read (sock, buffer, 16); 
  buffer[16] = 0; 
  sscanf (buffer, "%d %d", &Nbytes, &mode); 

  status = read (sock, buffer, Nbytes); 
  buffer[status] = 0; 

  strncpy (layout[0].label[mode].text, buffer, Nbytes);
  layout[0].label[mode].text[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;
  */


