Index of /~orc/Code/magicfilter/magicfilter-2.3.h
Name Last modified Size Description
Parent Directory 23-Jan-2008 12:15 -
Attic/ 05-Apr-2006 16:27 -
INSTALL 12-Dec-2002 00:45 5k
Makefile.in 11-Mar-2006 15:20 3k
VERSION 05-Apr-2006 16:27 1k
actions.c 18-Apr-2003 12:59 9k
args.c.in 30-Dec-2004 11:38 6k
basis/ 05-Apr-2006 16:27 -
configure.sh 05-Apr-2006 16:27 26k
contrib/ 05-Apr-2006 16:27 -
fe.c 09-May-2003 11:27 6k
file/ 05-Apr-2006 16:27 -
filters/ 05-Apr-2006 16:27 -
getaline.c 15-Aug-2002 16:06 2k
getline.c 14-Dec-2002 01:02 8k
magic.m4.in 03-Feb-2006 12:46 4k
magicfilter-t.5.in 15-Aug-2002 17:09 5k
magicfilter.5.in 14-Dec-2002 01:02 9k
magicfilter.8templ.in 05-Sep-2002 16:00 6k
magicfilter.h.in 09-May-2003 11:27 3k
mkmagic 09-May-2003 11:27 1k
mkmpp 09-May-2003 11:27 1k
reject.c 11-Jul-2002 16:23 2k
rule.h 11-Jul-2002 16:23 3k
trace.c 01-Feb-2001 01:10 2k
xyzzy.c 09-May-2003 11:27 3k
This is magicfilter 2.3
It's somewhat different from magicfilter 1.2:
* the printer definition file format has changed; it is now a simple
m4 macro file that passes define()'s in to magicfilter.
* the code uses libmagic (either the one in recent versions of
file(1) or a homemade clone of it in the copy of file that's
included in the sources) to do pattern matching instead of
hand-identifying file types.
* system() is no longer used to execute filters and pipes; they are now
directly execvp'ed to cut down on the number of processes
magicfilter launches. This means that environment variables
are no longer substituted, except for the special case of single
arguments named $FILE, which, if they are arguments to fpipe and
ffilters, will be replaced with the name of the scratchfile created
for the pipe. If this is a major problem, pester me and I'll think
about putting system() back in.
* all new processes are children of magicfilter, instead of some being
punted off into their own little groups.
* reject doesn't do mail notifications yet.
Building magicfilter
magicfilter 2.3 doesn't use gnu autoconf any more, because gnu autoconf
requires gnu m4 and I don't have that on Mastodon. Instead, I've written
my own little replacement called configure.sh, which works somewhat the
same as the gnu configure script:
I configure magicfilter via:
CC="cc -baout -m386" CFLAGS="-O2" ./configure.sh --prefix=/usr
./configure.sh --help gives a listing of the options it currently
accepts; most are similar to the gnu autoconf ones, except --path,
which gives configure a path so it will look for programs in places
other than the default /bin:/usr/bin:/usr/local/bin path.
Copyrights
libfile is made from the file(1) program, and carries the same
BSD-style copyright.
magicfilter itself ended up being completely rewritten, and now
carries a BSD-style copyright.
The manual pages were written by hpa, and thus carry the same
copyright -- the GNU GPL -- as magicfilter 1.2 does.
The filters were written by hpa, et alii, then trimmed fairly
drastically for magicfilter 2. They are public domain.
-david parsons (orc@pell.chi.il.us)