mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-15 06:52:23 +00:00
read_smf_lenient keeps what comes before MAX_EVENTS events or MAX_TRACKS tracks and only says so in a warning. Those warnings are words, and at most MAX_WARNINGS of them are kept: when earlier damage has filled them, nothing tells the caller that the file was cut. LenientRead gets over_limit, set whenever either limit left something out, full warnings or not. A caller that refuses over-limit files, as read_smf does, can now do so after a lenient read. LenientRead is non_exhaustive, so the new field breaks no caller.