mirror of
https://github.com/darlinghq/darling-gdb.git
synced 2024-12-02 00:56:27 +00:00
27 lines
569 B
Awk
27 lines
569 B
Awk
|
NR == 1 {
|
||
|
FS="\"";
|
||
|
print "/* ==> Do not modify this file!! It is created automatically"
|
||
|
printf " from %s using the make-c-prog.awk script. <== */\n\n", FILE
|
||
|
print "#include <stdio.h>"
|
||
|
}
|
||
|
|
||
|
{
|
||
|
if (curfun != FUNCTION)
|
||
|
{
|
||
|
if (curfun)
|
||
|
print "}"
|
||
|
curfun = FUNCTION
|
||
|
print ""
|
||
|
print "void";
|
||
|
printf "%s (file)\n", FUNCTION
|
||
|
print " FILE *file;";
|
||
|
print "{";
|
||
|
}
|
||
|
printf " fputs (\"";
|
||
|
for (i = 1; i < NF; i++)
|
||
|
printf "%s\\\"", $i;
|
||
|
printf "%s\\n\", file);\n", $NF;
|
||
|
}
|
||
|
|
||
|
END { print "}" }
|