File: list-macros.sh

package info (click to toggle)
mbedtls 2.16.0-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 14,280 kB
  • sloc: ansic: 82,148; sh: 9,179; python: 2,127; perl: 1,414; makefile: 1,189; cpp: 93; tcl: 4
file content (16 lines) | stat: -rwxr-xr-x 352 bytes parent folder | download | duplicates (15)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh

set -eu

if [ -d include/mbedtls ]; then :; else
    echo "$0: must be run from root" >&2
    exit 1
fi

HEADERS=$( ls include/mbedtls/*.h | egrep -v 'compat-1\.3\.h' )

sed -n -e 's/.*#define \([a-zA-Z0-9_]*\).*/\1/p' $HEADERS \
    | egrep -v '^(asm|inline|EMIT|_CRT_SECURE_NO_DEPRECATE)$|^MULADDC_' \
    | sort -u > macros

wc -l macros