IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 27, 2005, 3:23:01 PM (21 years ago)
Author:
eugene
Message:

substantial work to move kii/kapa call into libkapa, unify RotFont, bDraw functions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/kapa/graph/LoadLabels.c

    r2473 r5852  
    33int LoadLabels () {
    44 
    5   char buffer[256], *c;
    6   int status, Nbytes, mode, size;
     5  char *c, *label;
     6  int mode, size, Nbytes;
    77  Layout *layout;
    88 
     
    1111  fcntl (sock, F_SETFL, !O_NONBLOCK); 
    1212 
    13   status = read (sock, buffer, 16);
    14   buffer[16] = 0;
    15   sscanf (buffer, "%d %d", &Nbytes, &mode);
     13  KiiScanMessage (sock, "%d", &mode);
     14  label = KiiRecvData (sock);
    1615
    17   status = read (sock, buffer, Nbytes);
    18   buffer[status] = 0;
    19 
    20   strncpy (layout[0].label[mode].text, buffer, Nbytes);
    21   layout[0].label[mode].text[Nbytes] = 0;
     16  Nbytes = MIN (strlen(label), 127);
     17  strncpy (layout[0].label[mode].text, label, Nbytes);
     18  label[Nbytes] = 0;
    2219
    2320  fcntl (sock, F_SETFL, O_NONBLOCK); 
Note: See TracChangeset for help on using the changeset viewer.