[File] New contributor's questions
Christos Zoulas
christos at zoulas.com
Tue Apr 18 16:42:04 UTC 2023
On 2023-04-18 11:04 am, Vadim (vadcx) wrote:
> Hello, I want to contribute about a dozen of smaller formats and
> wanted to clarify a few things:
>
> 1. Preferred patch submission: via mailing list or the bug tracker?
I accept both, prefer the bug-tracker so that we can follow up
independently
if there are any issues.
> 2. Does the !:ext keyword have a meaning? I found it in Magdir/games
> but it's not in the man file.
Yes, it is a slash-separated list of extensions. I documented it now.
> 3. File formats that do NOT have a magic but are otherwise identified
> by a known file name + extension: are they out of scope of this
> project? The closest thing I see is the "language" check in "man file"
File(1) typically works on file data, not file names. The :ext notations
we've started collecting can be used in the future to provide such
identification,
but we have not decided how to implement this (or if should be
implemented at all).
> 4. I see there's a big definition file "Magdir/games", I plan to add
> about 10-15 definitions for single game. Should they go into the games
> too or is it okay to give it a separate definition file?
You can give it a separate file.
> 4.1 How does magic determine where one definition ends and the next
> one starts? (also not in man)
It can use absolute or relative offsets. There is a lot of documentation
and examples in the "magic" man page.
> 5. The string type can have a fixed length with "string/4" - limited
> to 4 bytes. Is it relevant to performance vs unbounded string?
It is not a length, it is a match indicator; again seem magic.4 or
magic.5
depending on your OS.
> I will take "i dont know" as an answer too (as a hint to dig into the
> source code myself). I'll update the manual with the answers received.
Please let me know if something is not clear or you have more questions!
christos
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: OpenPGP digital signature
URL: <https://mailman.astron.com/pipermail/file/attachments/20230418/39d6b7df/attachment.asc>
More information about the File
mailing list