On 19 April 2017 at 23:04, renyuneyun <renyuneyun@xxxxxxxxx> wrote: >> I agree. What comes to header data it should include header length >> in bytes. Something like >> >> ### script(1) typescript; Header Length: 104 Version: util-linux >> v2.30; Date: 2017-04-18 12:10:43+0200 >> >> As long it's easy to know how long to jump rest of the format does >> not really matter. Right. > > Forgive my witless, what's the point of introducing a length? Doesn't we > already know the header takes (and only takes) the first line? That's true until something happens and multiline header is needed. Secondly having a header lengh makes jumping over it really, really easy and universal[1]. By that I mean no matter how many lines, no translator can add new lines if they wish, scales well after header is thousands items long, perhaps somethine else as well. Sure this extra element header a little longer, but I cannot think of any other downside. [1] ref: long offset; fscanf(tfile, "### script(1) typescript; Header Length: %ld ", &offset); fseek(tfile, offset, SEEK_SET); -- Sami Kerola http://www.iki.fi/kerolasa/ -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html