Package: file Version: 4.17-5 Severity: normal File: /usr/share/man/man5/magic.5.gz
I'm trying to understand the meaning of the offset field for a regex rule. magic(5) says: "The regular expression is always tested against the first N lines, where N is the given offset, thus it is only useful for (single-byte encoded) text." which suggests that when the offset is 0, it should never match. Or at least, only in the first line. But instead, if I have a rule like this: 0 regex \\documentclass LaTeX 2e document text then it matches an occurrence of \documentclass on line 11 of a test file. As far as I can tell from looking at the source, 0 means "no limit", although I don't know if libmagic imposes some arbitrary upper limit on how much of the file is searched. The above paragraph should be updated. -- System Information: Debian Release: 4.0 APT prefers testing APT policy: (500, 'testing') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.17 Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) Versions of packages libmagic1 depends on: ii libc6 2.3.6.ds1-8 GNU C Library: Shared libraries ii zlib1g 1:1.2.3-13 compression library - runtime libmagic1 recommends no packages. Versions of packages file depends on: ii libc6 2.3.6.ds1-8 GNU C Library: Shared libraries -- no debconf information -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]