2 # This script verifies that qerror definitions and table entries are
3 # alphabetically ordered.
9 # sort -C verifies order but does not print a message. sort -c does print a
10 # message. These options are both in POSIX.
11 if ! "$@" | sort -C; then
19 check_order 'Definitions in qerror.h must be in alphabetical order:' \
20 grep '^#define QERR_' qerror.h
21 check_order 'Entries in qerror.c:qerror_table must be in alphabetical order:' \
22 sed -n '/^static.*qerror_table\[\]/,/^};/s/QERR_/&/gp' qerror.c