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 ""
|
* alpha.c, basic_blocks.c, basic_blocks.h, bb_exit_func.c,
call_graph.c, call_graph.h, cg_arcs.c, cg_arcs.h, cg_dfn.c,
cg_dfn.h, cg_print.c, cg_print.h, corefile.c, corefile.h,
gmon_io.c, gmon_io.h, gprof.c, gprof.h, hertz.h, hist.c, hist.h,
i386.c, mips.c, search_list.c, search_list.h, source.c, source.h,
sparc.c, sym_ids.c, sym_ids.h, symtab.c, symtab.h, tahoe.c,
utils.c, utils.h, vax.c, gen-c-prog.awk: Convert K&R C to ANSI C.
2004-05-26 12:55:55 +08:00
|
|
|
print "void ", FUNCTION, "(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 "}" }
|