Sorry, but I don't quite follow. Are you on a linux/unix system? If so, you could use "od -x wordlist" to list it in hex format. If you have ANY "0d" characters in the file, then you have a file with DOS/Windows style newlines, which is not what linux/unix expects, so you will need to strip them.
Modifying your strip functionality like this would do:
Code:for (i=0; i<sizeof(words)/sizeof(words[0]); i++) { char *p = strchr(words[i],'\n'); char *q = strchr(words[i],'\r'); if (q && q < p) p = q; if(p) { *p = '\0'; } }
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.