 - For CBM headers with payload > 192 bytes, the crc-32 is still computed on
   the first 192 bytes only. Is this acceptable? (Luigi)
 - Make a consistent choice about the post-data patterns (in most cases these 
   are described as part of the trailer, whose size is therefore augumented)
   (Luigi)
 - Rewrite: burner.c (requires some decrypting), chr.c, 
   firebird.c, freeload.c, hitec.c, hitload.c, ikloader.c, 
   jetload.c, microload.c, oceannew1t*.c, oceannew2.c, rasterload.c, snake*.c, 
   turbotape.c, usgold.c, virgin.c (check size of pilots/trailers as well on 
   tapes using each of these) (Luigi)
 - There doesn't appear to be any reason for abandoning search when nova_f1 
   block header contains broken bytes. Proceed with validation and further 
   scanning (Luigi)
 - The block header validation recently (0.27) added to Freeload and Ocean New 
   scanners by fabbo should be added to old scanners, wherever appropriate 
   (Luigi)
    Done for most scanners. TODO: superpav.c, supertape.c. Leave wildload.c as 
    it is (chain of files without individual pilot+sync: if one is broken we 
    have to give up)
 - describe_file(i) is used in analyze() (via describe_blocks() in order to 
   calculate the overall CRC-32 value that is displayed in the summary) and in 
   report() (via print_database()) thus producing an unnecessary overhead (PRG 
   contents are generated twice) while scanning. 
   "if (blk[row]->dd != NULL)" cannot always be used not to regenerate. We need 
   the extra info and the error messages in the report that are produced while 
   extracting PRG data (Luigi)
 - Move WAV/AU file to same folder as source. (Luigi)
 - Make sure the sof, sod, eod, eof values have a consistent meaning across all 
   scanners. eod: it should always include postdata and/or checkbyte for 
   consistency. See entry below suggested by SLC too. (Luigi)
 - Trailer length: make sure postdata and/or checkbyte lengths are consistently 
   subtracted (or not subtracted) from the trailing sequence length in all new 
   scanners. See entry below suggested by SLC too. (Luigi)
 - Allow partial EOFMARKER (i.e. only 7 valid pulses followed by a single over-
   stretched one) in tdi_f2.c. Last pulse is often corrupted. (Luigi)
    Code written, it is going to be tested.
 - Review Hi-Tec and Virgin loader. These should really be Hi-Tec/Mastertronic 
   T1, T2, T3, where:
    CBM Data CRC32 0x895DCF44 -> T1 (Threshold 0x015E)
    CBM Data CRC32 0x342A2416 -> T2 (Threshold 0x016E)
    CBM Data CRC32 0xFADDF41C -> T3 (Threshold 0x017E)
   Disambiguation should be achieved by means of the fast scanning based on CBM 
   Data CRC32. (Luigi)
 - When last pulse of a checkbyte is broken in Pavloda (either oversized or 
   merged into a long pulse) the cleaning stage must fix it. The last pulse is 
   0x3F if no 0x1F preceeds it and it's 0x1F otherwise. (Luigi)
 - It must be responsibility of the cleaning process to reconstruct the last 
   bit of the last byte of pattern found in Ash+Dave trailer, 0x77, not of the 
   scanner. Move the reconstruction there. (Luigi)
 - Gremlin F2 should be split in T1 (Krakout, Bulldog) and T2 (Avenger).
   Possibly even more Tn variants each with its own Threshold counter. (Luigi)
    Done. Splitted into F1 and F2 due to the structural loader differences.
 - Make some templates for the xxx_search() and xxx_describe() functions. (Luigi)
    Done to some extent.
 - FIX xxx_search() functions by checking the return value from addblockdef() 
   before assigning 'eof' to 'i'. (Luigi)
    Done for new scanners.
 - Fix long / int usage in crc32.c.
    This is not a problem with gcc, but with MS Visual C++ that assumes that
    the size for int and long (4 bytes) are different
    Or replace it with SHA256 as crc32 is not safe
 - Check for memory and filehandle leaks (error handling).
    Partly done.
 - Add a portable strupr function for sort_list in filesearch.c.
    Use strcasecmp instead?
    strupr from Peter Karlsson
     #include <ctype.h>		/* toupper() */                 
     void strupr(char *s)
     {
             do {
                     *s = toupper(*s);
                } while(*s++);
     }
 - Add warning about Gremlin Fastload (if we add that loader) (Luigi)
    Only clean those if you know what you are doing.
    Certain pulses can be misdetected/converted.
 - Split the code into more manageable parts
    Much of this is now done.
 - Make the code more generic
 - Check start/end pilot/data/trailer:
    SLC says:
    Example from tcreport.txt: Location: $A726 -> $AF33 -> $75C9B -> $76491
    The first points to the first pulse in the file (usually pilot).
    The second as you know points to the first datapulse.
    The third one points to the first pulse of the last byte..
    this is usually a checkbyte, but in the case it's NOT,
    it's pointing to the first pulse of the last databyte
    This you also needs to compensate for when calculating the crc32 and
    extracts data and also when counting trailers.
    And the last value points to the very last pulse in a file, that being
    last pulse of a databyte, checkbyte or just a trailer.
    CHECK: ODEload + Cult
    Probably check ALL loaders....
 - Use dynamic memory allocation for file/dir names where possible.
 - Avoid hardcoded values as much as possible, use #define.
 - Use "static" and "const" keywords whenever possible.
    Much is done.
 - Use the getcwd(buffer, size) call with buffer initialized to NULL and 
   size to -1, which should be memory safe. Then allocate a new string 
   whose size is buffer size + 2 to append SLASH and a '\0'. Strcpy and then
   free the first one.
 - Get rid of most #ifdef WIN32 stuff.
    We need to handle both windows and linux(unix), but #ifdefs are ugly.
    Keep to a bare minimum.
    Mostly done.
 - Do some major rewrite of scanners.
    There is WAY TOO MUCH duplication of code.
 - Unify scanner/loader names/strings
 - Add new header info to all 'old' scanners and check that the code actually
   are doing what the header info says.
   Messages from Luigi:
    This header contains all the information needed to quickly check the code
    and to automate the code writing process. It should be filled in before
    writing the search() function.
    If a field is mandatory it must be checked within the search() function.
    Check the scanners for mandatory fields and how they are searched for inside
    their respective search() function.
 - Fix int - long problem with all ftell, fwrite, fseek etc functions
 - Make it possible to create WAV without cleaning first...
 - Fix broken CBM Header and Data Blocks if the other one of the pair is OK

