calc_next_index
idx = calc_next_index(idx, hsize, step);
idx = calc_next_index(idx, mohandle->mo.mo_hsize, step);