Pawl-and-ratchet mechanisms