Audiovox P965 Arkusz Danych Strona 230

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 280
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 229
API in C
227
}
}
// if any errors, get the next sentence
if (stReturnSentence.iReturnValue == TRAP || stReturnSentence.iReturnValue == FATAL)
{
readSentence(fdSock);
}
if (DEBUG)
{
for (i=0; i<stReturnSentence.iLength; i++)
{
printf("stReturnSentence.szSentence[%d] = %s\n", i, stReturnSentence.szSentence[i]);
}
}
return stReturnSentence;
}
/********************************************************************
* Read sentence block from the socket...keeps reading sentences
* until it encounters !done, !trap or !fatal from the socket
********************************************************************/
struct Block readBlock(int fdSock)
{
struct Sentence stSentence;
struct Block stBlock;
initializeBlock(&stBlock);
DEBUG ? printf("readBlock\n") : 0;
do
{
stSentence = readSentence(fdSock);
DEBUG ? printf("readSentence succeeded.\n") : 0;
addSentenceToBlock(&stBlock, &stSentence);
DEBUG ? printf("addSentenceToBlock succeeded\n") : 0;
} while (stSentence.iReturnValue == 0);
DEBUG ? printf("readBlock completed successfully\n") : 0;
Przeglądanie stron 229
1 2 ... 225 226 227 228 229 230 231 232 233 234 235 ... 279 280

Komentarze do niniejszej Instrukcji

Brak uwag