diff -r 21a6c17f4e3e -r 629f61203db1 test/TestUtils.cpp --- a/test/TestUtils.cpp Mon Sep 28 23:39:08 2009 -0700 +++ b/test/TestUtils.cpp Tue Sep 29 15:46:42 2009 -0700 @@ -25,7 +25,7 @@ void shuffle(int a[], int n, unsigned seed) { if (seed==0) { -#ifdef BSD +#ifdef _DARWIN_C_SOURCE srandomdev(); #endif seed = random(); @@ -54,16 +54,11 @@ while (NULL != ::fgets(word, 4096, in)) { wordLen = ::strlen(word); if (word[wordLen-1]=='\n') { - word[wordLen-1] = '\0'; - wordLen--; - } - - if (wordLen == 0) continue; - - sWords[sNWords] = strdup(word); - //if( sNWords % 10000 == 0) - // printf("'%s' ... ", sWords[sNWords]->string()); - sNWords++; + word[wordLen-1] = '\0'; + wordLen--; + } + if (wordLen > 0) + sWords[sNWords++] = strdup(word); } } } @@ -99,7 +94,7 @@ using namespace Mooseyard; int main(int argc, char **argv) { -#if BSD +#ifdef _DARWIN_C_SOURCE srandomdev(); #endif try {