the detection of MS-Windows icon files was buggy and incomplete. Since
non-animated cursors have a very similar format, they are added here,
too.
Some details: Using only the very first four octets for determination
has always some risk of false detection. So additionally look at
offset 9 which should always be zero, but according to Wikipedia might
also be 0xff.
In "number of colors" at offset 8, the zero value previously was used
to describe "256 colors", according to Wikipedia this isn't true, so
it was dropped.
On a side node: This introduces another usage of name/use. I'm afraid
we might sooner or later end up in name clashes on these identifiers.
Feel free to extend them like prefixing with the file name "msdos-".
Also, I was a bit surprised no "message" in "use" is printed, I wanted
to do
>>4 use ico-dir MS Windows icon resource
but that message gets lost. Hence the hackery
>>0 byte x MS Windows icon resource
>>4 use ico-dir
So a feature request: Print any message in "use".
This patch by the way fixes Debian#562250. It just got a little
bigger.