Retro68/binutils/gprof/gen-c-prog.awk

28 lines
621 B
Awk
Raw Normal View History

2012-03-26 19:18:29 +00:00
NR == 1 {
FS="\"";
print "/* ==> Do not modify this file!! It is created automatically"
printf " from %s using the gen-c-prog.awk script. <== */\n\n", FILE
print "#include <stdio.h>"
print "#include \"ansidecl.h\""
}
{
if (curfun != FUNCTION)
{
if (curfun)
print "}"
curfun = FUNCTION
print ""
print "void ", FUNCTION, "(FILE *);"
print "void";
2017-04-10 11:32:00 +00:00
printf "%s (FILE *file)\n", FUNCTION
2012-03-26 19:18:29 +00:00
print "{";
}
printf " fputs (\"";
for (i = 1; i < NF; i++)
printf "%s\\\"", $i;
printf "%s\\n\", file);\n", $NF;
}
END { print "}" }