Received: (at submit) by bugs.debian.org; 9 Apr 1998 12:59:36 +0000 Received: (qmail 28548 invoked from network); 9 Apr 1998 12:59:20 -0000 Received: from ppp-36.a2points.com (HELO ppp37.a2points.com) (root@195.10.6.36) by debian.novare.net with SMTP; 9 Apr 1998 12:59:20 -0000 Received: (from dwitch@localhost) by ppp37.a2points.com (8.8.8/8.8.8/Debian/GNU) id PAA14541; Thu, 9 Apr 1998 15:00:56 +0200 Date: Thu, 9 Apr 1998 15:00:56 +0200 Message-Id: <199804091300.PAA14541@ppp37.a2points.com> From: Yann Dirson MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: Debian bug-system submission Subject: file, magicfilter: duplicate information - magic numbers X-Mailer: VM 6.42 under Emacs 19.34.1 Package: file, magicfilter Version: 3.24-4, 1.2-20 Severity: wishlist Both file and magicfilter use a magic number DB to identify file formats. This leads to duplicate information - the DB's can't be expected to be in sync all of the time. Further more, both text DB formats are limitted to each one's field of application. It would be great to have a general-purpose magic-number-handling library, with a generic DB that would associate magics to cannonical ID's, and maybe other recognizable infos, like file can identify. "file" would be able to output its info in whatever language the user wishes, and "magicfilter" would have the same knowledge base as "file" does. Maybe the work I did for the console tools (recently uploaded into slink as package utils/console-tools) could be used as a base for this, although it is not generic enough as such: magic definitions are hardcoded in a struct - this can be easily fixed by using an external DB; there are only basic informations that allow to recognize a file with a magic+mask starting at offset 0 - the data structure have to be extended / made more generic). If your're interested in this idea, you will find the relevant code in console-tools' source package, in files lib/findfile*.c. -- Yann Dirson | Stop making M$-Bill richer & richer, alt-email: | support Debian GNU/Linux: debian-email: | more powerful, more stable ! http://www.a2points.com/homepage/3475232 | Check