2020-12-30 02:40:26 +11:00
|
|
|
#!/usr/bin/awk -f
|
|
|
|
|
2021-01-04 03:56:41 +11:00
|
|
|
#
|
|
|
|
# this utility script make a file who
|
|
|
|
# is includet by 'crapulator.c'
|
|
|
|
#
|
2020-12-30 02:40:26 +11:00
|
|
|
BEGIN {
|
2023-02-13 20:57:14 +11:00
|
|
|
print "// -------------------------------------"
|
|
|
|
print "// generated file, do not edit by hand !";
|
|
|
|
print "// -------------------------------------"
|
|
|
|
print "Crapulor CrapL[] = {";
|
2020-12-30 02:40:26 +11:00
|
|
|
}
|
|
|
|
|
2021-05-11 19:36:55 +11:00
|
|
|
# $1 is the badly brain-designed numeric id
|
|
|
|
# $2 is the user name of the filter
|
|
|
|
# $3 and $4 are two not used parameters
|
|
|
|
#
|
2020-12-30 02:40:26 +11:00
|
|
|
{
|
2023-02-13 20:57:14 +11:00
|
|
|
name = sprintf("CR_%s", $2)
|
2023-07-16 23:14:29 +11:00
|
|
|
printf " { %-14s, \"%s\", %d, %f }, // #%d\n",
|
2023-02-13 20:57:14 +11:00
|
|
|
name, $2, $3, $4, $1;
|
2020-12-30 02:40:26 +11:00
|
|
|
}
|
|
|
|
|
|
|
|
END {
|
2020-12-31 00:42:44 +11:00
|
|
|
print " { -1, NULL }"
|
|
|
|
print " };"
|
2023-02-14 03:56:08 +11:00
|
|
|
print "// ! generated file, do not edit by hand !"
|
2020-12-30 02:40:26 +11:00
|
|
|
}
|