File sniffing patch


Subject: File sniffing patch
From: Kevin Vajk (kvajk@ricochet.net)
Date: Mon Feb 07 2000 - 15:08:29 CST


This patch (also sent to the patches mail address) adds file type
detection based on the file contents. Precedence is given to the
filename suffix, so this code only gets used if the suffix if
unknown or unrecognized. In the future, I'd like to have a smarter
algorithm, which looks at both the suffix and the file contents,
and tries to find the best match.

UTF8 is not recognized, and there are some TODO's floating
around. Still, it may be better than nothing.

- Kevin Vajk
  <kvajk@ricochet.net>




This archive was generated by hypermail 2b25 : Mon Feb 07 2000 - 15:05:53 CST