FloatImg/Fonderie/craplist2h.awk

25 lines
485 B
Awk
Raw Normal View History

2020-12-29 16:40:26 +01:00
#!/usr/bin/awk -f
2021-01-03 17:56:41 +01:00
#
# this utility script make a file who
# is includet by 'crapulator.h'
#
2020-12-29 16:40:26 +01:00
BEGIN {
2023-02-13 10:57:14 +01:00
print "// -------------------------------------"
2020-12-29 16:40:26 +01:00
print "// generated file, do not edit by hand !"
2023-02-13 10:57:14 +01:00
print "// -------------------------------------"
2020-12-29 16:40:26 +01:00
}
2021-05-11 10:36:55 +02:00
# $1 is the badly brain-designed numeric id
# $2 is the user name of the filter
2020-12-29 16:40:26 +01:00
{
2023-02-13 10:57:14 +01:00
name = sprintf("CR_%s", $2)
printf "#define %-15s (%d)\n", name, $1
2020-12-29 16:40:26 +01:00
}
END {
2023-02-13 10:57:14 +01:00
print "\n// generated file, do not edit by hand !"
2020-12-29 16:40:26 +01:00
}