mail-index: new helper macro with more user-friendly semantics As the record ids range from 1..records_count, but the data is stored as if in a C-style 0-based array, current clients of MAIL_INDEX_MAP_IDX() must subtract 1 from the index themselved.
mail-index: new helper macro with more user-friendly semantics
As the record ids range from 1..records_count, but the data is
stored as if in a C-style 0-based array, current clients of
MAIL_INDEX_MAP_IDX() must subtract 1 from the index themselved.

New MAIL_INDEX_REC_AT_SEQ() macro does the subtraction for you,
it gives you (the address of) the record from a seq number.

Uglified users of the former will be migrated to the latter.

Signed-off-by: Phil Carmody <e888d2bd6f13f82caa51a37c03d034c76f661ba3@dovecot.fi>

LTD-Beget/dovecot,LTD-Beget/dovecot,LTD-Beget/dovecot,LTD-Beget/dovecot,LTD-Beget/dovecot