1999-05-03 15:29:11 +08: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>"
|
2002-02-11 02:52:30 +08:00
|
|
|
print "#include \"ansidecl.h\""
|
1999-05-03 15:29:11 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
{
|
|
|
|
if (curfun != FUNCTION)
|
|
|
|
{
|
|
|
|
if (curfun)
|
|
|
|
print "}"
|
|
|
|
curfun = FUNCTION
|
|
|
|
print ""
|
2002-02-11 02:52:30 +08:00
|
|
|
print "void ", FUNCTION, "PARAMS ((FILE *));"
|
1999-05-03 15:29:11 +08:00
|
|
|
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 "}" }
|