Audiovox P965 Datenblatt Seite 227

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 280
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 226
API in C
224
cLength[2] = cFirstChar;
cLength[2] &= 0x3f; // mask out the 1st 2 bits
read(fdSock, &cLength[1], 1);
read(fdSock, &cLength[0], 1);
}
else
{
cLength[1] = cFirstChar;
cLength[1] &= 0x3f; // mask out the 1st 2 bits
read(fdSock, &cLength[2], 1);
read(fdSock, &cLength[3], 1);
}
iLen = (int *)cLength;
}
// read 2 bytes
else if ((cFirstChar & 0x80) == 0x80)
{
DEBUG ? printf("2-byte encoded length\n") : 0;
if (iLittleEndian)
{
cLength[1] = cFirstChar;
cLength[1] &= 0x7f; // mask out the 1st bit
read(fdSock, &cLength[0], 1);
}
else
{
cLength[2] = cFirstChar;
cLength[2] &= 0x7f; // mask out the 1st bit
read(fdSock, &cLength[3], 1);
}
iLen = (int *)cLength;
}
// assume 1-byte encoded length...same on both LE and BE systems
else
{
DEBUG ? printf("1-byte encoded length\n") : 0;
iLen = malloc(sizeof(int));
*iLen = (int)cFirstChar;
}
return *iLen;
}
Seitenansicht 226
1 2 ... 222 223 224 225 226 227 228 229 230 231 232 ... 279 280

Kommentare zu diesen Handbüchern

Keine Kommentare