FloatImg/Fonderie/craplist2str.awk

24 lines
496 B
Awk
Executable File

#!/usr/bin/awk -f
#
# this utility script make a file who
# is includet by 'crapulator.c'
#
BEGIN {
print "// -----------------------------------"
print "// generated file, do not edit by hand";
print "// -----------------------------------"
print "Crapulor CrapL[] = {";
}
{
printf " { CR_%s, \"%s\", %d, %f }, // id=%d\n",
$2, $2, $3, $4, $1;
}
END {
print " { -1, NULL }"
print " };"
print "// generated file, do not edit by hand"
}