- Check that catopen() succeeded before calling catclose(). musl will crash in the latter if the catalogue descriptor is -1.
- Keep the message catalogue open for most of sort(1)'s actual operation.
- Don't use catgets(3) to print error messages if catopen(3) had failed.
I'm not sure how useful NLS support is, given that error messages are
available only in English and Hungarian, and support for the latter was
seemingly mostly broken. I suppose it serves as a useful example.