File: list-macros.sh

package info (click to toggle)
skiboot 7.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 35,624 kB
  • sloc: ansic: 221,198; sh: 11,580; cpp: 5,767; python: 3,421; makefile: 1,773; asm: 1,503; perl: 1,479; tcl: 1,188; pascal: 107
file content (16 lines) | stat: -rwxr-xr-x 352 bytes parent folder | download | duplicates (11)
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