swh:1:snp:c7c108084bc0bf3d81436bf980b46e98bd338453
Tip revision: 6a430fbda99473b3758be2e8e5e21ca6833471cb authored by Tobias Ellinghaus on 01 December 2013, 17:11:07 UTC
Another one ...
Another one ...
Tip revision: 6a430fb
update_dcraw.sh
#!/bin/bash
extract() {
echo "// file generated by $0, do not edit!"
dump="0"
while read line
do
# echo "[$dump]" $line
if [ "$dump" == "1" ]
then
echo $line | grep "CLASS" >&/dev/null && break
fi
if [ "$dump" == "1" ]
then
decl="0"
echo $line | grep 'double cam_xyz' >&/dev/null && decl="1"
echo $line | grep 'cam_xyz_coeff' >&/dev/null && decl="1"
echo $line | grep '\.black' >&/dev/null && echo -n "// "
echo $line | grep '\.maximum' >&/dev/null && echo -n "// "
if [ "$decl" == "0" ]
then
echo "$line"
fi
else
echo $line | grep "CLASS adobe_coeff" >&/dev/null && dump="1"
if [ "$dump" == "1" ]
then
echo "static void dt_dcraw_adobe_coeff(const char *make, const char *model, float cam_xyz[1][12])"
fi
fi
done
}
wget -nc www.cybercom.net/~dcoffin/dcraw/dcraw.c
cat dcraw.c | extract > adobe_coeff.c
git diff