I wish you'd posted this before I read through all the source code of other programs. This way looks lots easier than the way I found. I did it everything one byte at a time (without your functions

). I'll have to read through this in more detail sometime soon. I'll be sure to save a lot of time.