PRUint32 maxWordLength = 0; for (i = 0; i < count; ++i) { PRUint32 wordLength = tokens[i]->mWord.Length(); if (wordLength > maxWordLength) maxWordLength = wordLength;
fprintf(stream, "count = %lu, maxWordLength = %lu\n", count, maxWordLength);  for (PRUint32 i = 0; i < count; ++i) { Token* token = tokens[i]; fprintf(stream, "%s : %lu\n", token->mWord.get(), token->mCount); }  delete[] tokens; } else { fprintf(stream, "count = 0, maxWordLength = 0\n");
static void writeTokens(FILE* stream, Tokenizer& tokenizer){    PRUint32 i, count = tokenizer.countTokens();    Token ** tokens = tokenizer.getTokens();    if (!tokens) return;    // compute the maximum word length, so we can use a fixed buffer size when reading back in.    PRUint32 maxWordLength = 0;    for (i = 0; i < count; ++i) {        PRUint32 wordLength = tokens[i]->mWord.Length();        if (wordLength > maxWordLength)            maxWordLength = wordLength;    }    fprintf(stream, "count = %lu, maxWordLength = %lu\n", count, maxWordLength);        for (PRUint32 i = 0; i < count; ++i) {        Token* token = tokens[i];        fprintf(stream, "%s : %lu\n", token->mWord.get(), token->mCount);    }        delete[] tokens;}