xref: /freebsd/contrib/file/TODO (revision a5d223e6)
1b6cee71dSXin LIMost TODOs live in the TODO section of doc/file.man (i.e. file(1)).
2b6cee71dSXin LIThey are more visible there, so please add any further TODOs to that
3b6cee71dSXin LIfile, not here. More speculative material can live here.
47dbb948bSDavid E. O'Brien
580c86c36SDavid E. O'Brien(This change was made when Reuben Thomas noticed that all the bugs
680c86c36SDavid E. O'Brienlisted in the BUGS section of the man page had been fixed!)
7b6cee71dSXin LI
8b6cee71dSXin LI---
9b6cee71dSXin LIIt would be nice to simplify file considerably. For example,
10b6cee71dSXin LIreimplement the apprentice and non-pattern magic methods in Python,
11b6cee71dSXin LIand compile the magic patterns to a giant regex (or something similar;
12b6cee71dSXin LImaybe using Ragel (http://www.complang.org/ragel/)) so that only a
13b6cee71dSXin LIsmall amount of C is needed (because fast execution is typically only
14b6cee71dSXin LIrequired for soft magic, not the more detailed information given by
15b6cee71dSXin LIhard-wired routines). In this regard, note that hplip, which is
16b6cee71dSXin LIBSD-licensed, has a magic reimplementation in Python.
17*a5d223e6SXin LI---
18c2931133SXin LIRead the kerberos magic entry for more ideas.
19*a5d223e6SXin LI---
205f0216bdSXin LIWrite a string merger to make magic entry sizes dynamic.
215f0216bdSXin LIStrings will be converted to offsets from the string table.
22*a5d223e6SXin LI---
23*a5d223e6SXin LIProgramming language support, we can introduce the concept of a group
24*a5d223e6SXin LIof rules where n rules need to match before the rule is positive. This
25*a5d223e6SXin LIcould require structural changes to the matching code :-(
26*a5d223e6SXin LI
27*a5d223e6SXin LI0	group	2	# require 2 matches
28*a5d223e6SXin LI# rule 1
29*a5d223e6SXin LI>0	....
30*a5d223e6SXin LI...
31*a5d223e6SXin LI# rule 2
32*a5d223e6SXin LI>0	....
33*a5d223e6SXin LI...
34*a5d223e6SXin LI
35*a5d223e6SXin LIchristos
36*a5d223e6SXin LI
37