Xqxdecode has a fundamental flaw that means it never actually ran properly. It uses `fgets()` to read the header lines, under the assumption that they are newline-terminated. However, the most important of them all, the one preceding the ',XQX' magic number is actually null-terminated, so the program never ever correctly identifies the magic number and gets completely lost in the file. By adding our own `fgetsn()` that looks for both newline and null makes it work.