mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-28 04:25:10 +08:00
3e8f6abf1e
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.
29 lines
648 B
Awk
29 lines
648 B
Awk
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";
|
|
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 "}" }
|