set -e
config="$1"
-codecs="$2"
-out="$3"
+out="$2"
test -n "$out"
outval=""
while read line; do
case "$line" in
"};") break;;
- *CODEC_ID_FIRST*///*dummy*) ;;
+ *CODEC_ID_FIRST*=*) ;;
CODEC_ID_*) define_codecid ${line%%[=,]*};;
esac
done
}
parse_config_h < "$config"
-parse_avcodec_h < "$codecs"
+parse_avcodec_h # use stdin
sed -e '/case.*:/!y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/' \
-e 's/extern avcodec /extern AVCodec /' > "$out" <<EOF
$outval