Christos Zoulas [Sat, 22 Jun 1996 22:15:52 +0000 (22:15 +0000)]
- support relative offsets of the form >&
- fix bug with truncating magic strings that contain \n
- file -f - did not read from stdin as documented
- support elf file parsing using our own elf support.
- as always magdir fixes and additions.
Christos Zoulas [Sat, 20 May 1995 22:09:21 +0000 (22:09 +0000)]
Passed incorrect argument to eatsize().
Use %ld and %lx where appropriate.
Remove unused variables
ELF support for both big and little endian
Fixes for small files again.
- Incorrect nroff detection fix from der Mouse
- Lost and incorrect magic entries.
- Added ELF stripped binary detection [in C; ugh]
- Look for $MAGIC to find the magic file.
- Eat trailing size specifications from numbers i.e. ignore 10L
- More fixes for very short files
Christos Zoulas [Sat, 25 Mar 1995 22:06:45 +0000 (22:06 +0000)]
- use strtoul() where it exists.
- fix sign-extend bug
- try to detect tar archives before nroff files, otherwise
tar files where the first file starts with a . will not work
Christos Zoulas [Sat, 21 Jan 1995 21:03:35 +0000 (21:03 +0000)]
Added CSECTION for the file man page
Added version flag -v
Fixed bug with -f input flag (from iorio@violet.berkeley.edu)
Lots of magic fixes and reorganization...
Christos Zoulas [Wed, 27 Oct 1993 20:59:05 +0000 (20:59 +0000)]
Changed -z flag to understand gzip format too.
Moved builtin compression detection to a table, and move
the compress magic entry out of the source.
Made printing of numbers unsigned, and added the mask to it.
Changed the buffer size to 8k, because gzip will refuse to
unzip just a few bytes.
Fixed small bug in softmagic.c introduced by
copying the data to be examined out of the input
buffer. Changed the Makefile to use sed to create
the correct man pages.
Passed purify. Fixed indirections. Fixed byte order printing.
Fixed segmentation faults caused by referencing past the end
of the magic buffer. Fixed bus errors caused by referencing
unaligned shorts or longs.
Added more debugging information, and made existing
debugging printing to go to stderr. Added limit counts
to all functions to avoid spurious core-dumps.
Use calloc() to allocate magic entries to avoid unitialized
memory spurious errors. Change showstr to print to a file
and the ability to print both counted and null terminated strings
Ian Darwin [Fri, 19 Feb 1993 15:01:26 +0000 (15:01 +0000)]
Numerous changes from Guy Harris too numerous to mention but including
byte-order independance, fixing "old-style masking", etc. etc. A bugfix
for broken symlinks from martin@@d255s004.zfe.siemens.de.
Ian Darwin [Fri, 19 Feb 1993 14:22:48 +0000 (14:22 +0000)]
Part of Guy Harris' Jan-93 rewrite, including:
Add in support for multiple levels of continuation.
Add in support for "beshort", "belong", "bedate", "leshort",
"lelong", and "ledate" types.
Also, make old-style "not set"ting - "0 byte ^0x80 statically
linked", meaning "this line matches if any of the bits in the
value *aren't* set in the number from the file" - work.
Ian Darwin [Fri, 19 Feb 1993 14:22:47 +0000 (14:22 +0000)]
Part of Guy Harris' Jan-93 rewrite, including:
Add in support for "beshort", "belong", "bedate", "leshort",
"lelong", and "ledate" types.
NOTE: it doesn't support multi-level ">"; it wasn't clear to me
why it printed things such as "offset" and "indirect-offset" for
old-style continuations, as the offset into the file is an
absolute number *even for continuation lines*.