2020-08-23 13:07:16 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2020-08-23 16:44:53 +00:00
|
|
|
set -e
|
|
|
|
|
2020-08-23 13:07:16 +00:00
|
|
|
# Extract a list of the public API, both shared object functions and those
|
|
|
|
# static inline functions in the public headers.
|
|
|
|
|
|
|
|
usage () { echo "usage: `basename $0` notcurses-dir" ; }
|
|
|
|
|
|
|
|
[ $# -eq 1 ] || { usage >&2 ; exit 1 ; }
|
|
|
|
NCDIR="$1"
|
|
|
|
[ -d "$NCDIR" ] || { usage >&2 ; exit 1 ; }
|
|
|
|
|
|
|
|
generate_lists () {
|
2020-08-23 17:04:10 +00:00
|
|
|
grep -h ^API "$1"/include/notcurses/*.h | grep -v inline | sort
|
|
|
|
grep -h -A1 ^API\ inline "$1"/include/notcurses/*.h | \
|
|
|
|
sed -e '/^--$/d' -e 'N;s/\n/ /' -e 's/\(.*\){$/\1;/' | sort
|
2020-08-23 13:07:16 +00:00
|
|
|
}
|
|
|
|
|
2020-08-23 17:04:10 +00:00
|
|
|
generate_lists "$NCDIR" | sed -e 's/RESTRICT/restrict/g'
|