Audiovox P965 Scheda Tecnica Pagina 74

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 280
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 73
API in C using winsock
71
// update iLength
stBlock->iLength = iNewLength;
DEBUG ? printf("addSentenceToBlock stBlock->iLength=%d\n", stBlock->iLength) : 0;
}
/********************************************************************
* Initialize a new sentence
********************************************************************/
void initializeSentence(struct Sentence *stSentence)
{
DEBUG ? printf("initializeSentence\n") : 0;
stSentence->iLength = 0;
stSentence->iReturnValue = 0;
}
/********************************************************************
* Clear an existing sentence
********************************************************************/
void clearSentence(struct Sentence *stSentence)
{
DEBUG ? printf("initializeSentence\n") : 0;
free(stSentence->szSentence);
initializeSentence(stSentence);
}
/********************************************************************
* Add a word to a sentence struct
********************************************************************/
void addWordToSentence(struct Sentence *stSentence, char *szWordToAdd)
{
int iNewLength;
iNewLength = stSentence->iLength + 1;
// allocate mem for the new word position
if (stSentence->iLength == 0)
{
stSentence->szSentence = malloc(1 * sizeof stSentence->szSentence);
}
Vedere la pagina 73
1 2 ... 69 70 71 72 73 74 75 76 77 78 79 ... 279 280

Commenti su questo manuale

Nessun commento