Audiovox P965 Scheda Tecnica Pagina 229

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 280
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 228
API in C
226
free(szTmpWord);
DEBUG ? printf("word = %s\n", szRetWord) : 0;
return szRetWord;
}
else
{
return NULL;
}
}
/********************************************************************
* Read a sentence from the socket
* A Sentence struct is returned
********************************************************************/
struct Sentence readSentence(int fdSock)
{
struct Sentence stReturnSentence;
char *szWord;
int i=0;
int iReturnLength=0;
DEBUG ? printf("readSentence\n") : 0;
initializeSentence(&stReturnSentence);
while (szWord = readWord(fdSock))
{
addWordToSentence(&stReturnSentence, szWord);
// check to see if we can get a return value from the API
if (strstr(szWord, "!done") != NULL)
{
DEBUG ? printf("return sentence contains !done\n") : 0;
stReturnSentence.iReturnValue = DONE;
}
else if (strstr(szWord, "!trap") != NULL)
{
DEBUG ? printf("return sentence contains !trap\n") : 0;
stReturnSentence.iReturnValue = TRAP;
}
else if (strstr(szWord, "!fatal") != NULL)
{
DEBUG ? printf("return sentence contains !fatal\n") : 0;
stReturnSentence.iReturnValue = FATAL;
Vedere la pagina 228
1 2 ... 224 225 226 227 228 229 230 231 232 233 234 ... 279 280

Commenti su questo manuale

Nessun commento