diff options
author | joerg <joerg@FreeBSD.org> | 1996-12-11 14:09:12 +0000 |
---|---|---|
committer | joerg <joerg@FreeBSD.org> | 1996-12-11 14:09:12 +0000 |
commit | 2f3249e30505ccc6b0eb2fd1b892f3e2813453ce (patch) | |
tree | 97aba5034f2e97275813d181d18b4b2128f57e57 /usr.bin/file/file.c | |
parent | ee57f46ce0a7ad65af6b01f68b94eb2b9d315d79 (diff) | |
download | FreeBSD-src-2f3249e30505ccc6b0eb2fd1b892f3e2813453ce.zip FreeBSD-src-2f3249e30505ccc6b0eb2fd1b892f3e2813453ce.tar.gz |
Add another matching algorithhm to do heuristics for international
language text files.
Should finally close PR # bin/1925: file does not consider cyrillic
text..., though i've never got any response from the originator about
my suggestion.
While i was at it, also move out the `magic' file to /usr/share/misc,
there's nothing that magic with this file to justify its life under
/etc.
Diffstat (limited to 'usr.bin/file/file.c')
-rw-r--r-- | usr.bin/file/file.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/file/file.c b/usr.bin/file/file.c index 5814255..5400083 100644 --- a/usr.bin/file/file.c +++ b/usr.bin/file/file.c @@ -26,7 +26,7 @@ */ #ifndef lint static char *moduleid = - "@(#)$Id: file.c,v 1.2 1995/05/30 06:30:01 rgrimes Exp $"; + "@(#)$Id: file.c,v 1.3 1996/01/23 12:40:11 mpp Exp $"; #endif /* lint */ #include <stdio.h> @@ -343,6 +343,10 @@ int nb, zflag; if (ascmagic(buf, nb)) return 'a'; + /* see if it's international language text */ + if (internatmagic(buf, nb)) + return 'i'; + /* abandon hope, all ye who remain here */ ckfputs("data", stdout); return '\0'; |