ring-index

ring-index is a compiled Lisp function in `ring.el'.

(ring-index INDEX HEAD RINGLEN VECLEN)

Convert nominal ring index INDEX to an internal index.
The internal index refers to the items ordered from newest to oldest.
HEAD is the index of the oldest element in the ring.
RINGLEN is the number of elements currently in the ring.
VECLEN is the size of the vector in the ring.