aboutsummaryrefslogtreecommitdiffstats
path: root/genheader.sh
blob: 8a253b71440243a0fe9c88de39e9359c1adbd3f7 (plain) (blame)
1
2
3
4
#!/bin/sh
L=$(wc -l libhashtable.c | tr -s ' ' | cut '-d ' -f2)
cat libhashtable.c | grep -A "$L" _A_ | grep -B "$L" _B_ | grep -v "_[AB]_" > hashtable.h
cat libhashtable.c | grep '(.*) *{' | egrep -v 'switch|if|for|while' | sed 's/ {/;/' >> hashtable.h