This commit is contained in:
tTh 2023-02-13 10:57:14 +01:00
parent 154844c94d
commit a449c53592
2 changed files with 13 additions and 11 deletions

View File

@ -6,18 +6,19 @@
# #
BEGIN { BEGIN {
print "// -----------------------------------" print "// -------------------------------------"
print "// generated file, do not edit by hand !" print "// generated file, do not edit by hand !"
print "// -----------------------------------" print "// -------------------------------------"
} }
# $1 is the badly brain-designed numeric id # $1 is the badly brain-designed numeric id
# $2 is the user name of the filter # $2 is the user name of the filter
{ {
printf "#define CR_%s (%d)\n", $2, $1 name = sprintf("CR_%s", $2)
printf "#define %-15s (%d)\n", name, $1
} }
END { END {
print "// generated file, do not edit by hand !" print "\n// generated file, do not edit by hand !"
} }

View File

@ -5,9 +5,9 @@
# is includet by 'crapulator.c' # is includet by 'crapulator.c'
# #
BEGIN { BEGIN {
print "// -----------------------------------" print "// -------------------------------------"
print "// generated file, do not edit by hand"; print "// generated file, do not edit by hand !";
print "// -----------------------------------" print "// -------------------------------------"
print "Crapulor CrapL[] = {"; print "Crapulor CrapL[] = {";
} }
@ -16,12 +16,13 @@ BEGIN {
# $3 and $4 are two not used parameters # $3 and $4 are two not used parameters
# #
{ {
printf " { CR_%s, \"%s\", %d, %f }, // id=%d\n", name = sprintf("CR_%s", $2)
$2, $2, $3, $4, $1; printf " { %-12s, \"%s\", %d, %f }, // #%d\n",
name, $2, $3, $4, $1;
} }
END { END {
print " { -1, NULL }" print " { -1, NULL }"
print " };" print " };"
print "// generated file, do not edit by hand" print "// generated file, do not edit by hand !"
} }