From a449c53592bbd9ada0c88113fb239981222f9ad1 Mon Sep 17 00:00:00 2001 From: tTh Date: Mon, 13 Feb 2023 10:57:14 +0100 Subject: [PATCH] cosmetic --- Fonderie/craplist2h.awk | 9 +++++---- Fonderie/craplist2str.awk | 15 ++++++++------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/Fonderie/craplist2h.awk b/Fonderie/craplist2h.awk index bd6c8ec..2689ff0 100755 --- a/Fonderie/craplist2h.awk +++ b/Fonderie/craplist2h.awk @@ -6,18 +6,19 @@ # BEGIN { - print "// -----------------------------------" + print "// -------------------------------------" print "// generated file, do not edit by hand !" - print "// -----------------------------------" + print "// -------------------------------------" } # $1 is the badly brain-designed numeric id # $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 { - print "// generated file, do not edit by hand !" + print "\n// generated file, do not edit by hand !" } diff --git a/Fonderie/craplist2str.awk b/Fonderie/craplist2str.awk index 47f73e9..47f3071 100755 --- a/Fonderie/craplist2str.awk +++ b/Fonderie/craplist2str.awk @@ -5,10 +5,10 @@ # is includet by 'crapulator.c' # BEGIN { - print "// -----------------------------------" - print "// generated file, do not edit by hand"; - print "// -----------------------------------" - print "Crapulor CrapL[] = {"; + print "// -------------------------------------" + print "// generated file, do not edit by hand !"; + print "// -------------------------------------" + print "Crapulor CrapL[] = {"; } # $1 is the badly brain-designed numeric id @@ -16,12 +16,13 @@ BEGIN { # $3 and $4 are two not used parameters # { - printf " { CR_%s, \"%s\", %d, %f }, // id=%d\n", - $2, $2, $3, $4, $1; + name = sprintf("CR_%s", $2) + printf " { %-12s, \"%s\", %d, %f }, // #%d\n", + name, $2, $3, $4, $1; } END { print " { -1, NULL }" print " };" - print "// generated file, do not edit by hand" + print "// generated file, do not edit by hand !" }