libcoprthr: added utility function readi()