master
Initial import of FreeBSD sort.
remove unneeded semicolons; checked by millert@
Cleanup: Delete handling of LC_COLLATE (which has no effect) and delete support for non-ASCII single-byte encodings, allowing to replace the condition byte_sort == 1 with sort_mb_cur_max == 1. Since none of our single-byte character and string functions are locale dependent, also zap inspection of LC_CTYPE while here.
Delete tentacles of LC_NUMERIC support. Our libc doesn't support that now and won't in the future. Minus ~90 lines of code, no functional change. OK tb@
murder excessive whitespace
Don't need to include stdint.h
Just use sort_reallocarray() everywhere.
Fixed whitespace issues.
Rewrite the description of how sorting works by default, in particular avoiding the nebulous word "lexicographically" and clarifiying that characters are ordered according to ascii(7). Polish a few nearby wordings for conciseness and readability. OK pascal@ jmc@
When system calls indicate an error they return -1, not some arbitrary value < 0. errno is only updated in this case. Change all (most?) callers of syscalls to follow this better, and let's see if this strictness helps us in the future.
No need for sysexits.h here.
Style nits, remove whitespace at the start of a function.