1#!/bin/sh
2
3set -eu
4
5if [ -d include/mbedtls ]; then :; else
6    echo "$0: must be run from root" >&2
7    exit 1
8fi
9
10HEADERS=$( ls include/mbedtls/*.h | egrep -v 'compat-1\.3\.h' )
11
12sed -n -e 's/.*#define \([a-zA-Z0-9_]*\).*/\1/p' $HEADERS \
13    | egrep -v '^(asm|inline|EMIT|_CRT_SECURE_NO_DEPRECATE)$|^MULADDC_' \
14    | sort -u > macros
15
16wc -l macros
17