diff options
author | Richard Henderson <rth@redhat.com> | 1999-05-03 07:29:11 +0000 |
---|---|---|
committer | Richard Henderson <rth@redhat.com> | 1999-05-03 07:29:11 +0000 |
commit | 252b5132c753830d5fd56823373aed85f2a0db63 (patch) | |
tree | 1af963bfd8d3e55167b81def4207f175eaff3a56 /gprof/gen-c-prog.awk | |
download | gdb-252b5132c753830d5fd56823373aed85f2a0db63.zip gdb-252b5132c753830d5fd56823373aed85f2a0db63.tar.gz gdb-252b5132c753830d5fd56823373aed85f2a0db63.tar.bz2 |
19990502 sourceware importbinu_ss_19990502
Diffstat (limited to 'gprof/gen-c-prog.awk')
-rw-r--r-- | gprof/gen-c-prog.awk | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/gprof/gen-c-prog.awk b/gprof/gen-c-prog.awk new file mode 100644 index 0000000..b59c1f8 --- /dev/null +++ b/gprof/gen-c-prog.awk @@ -0,0 +1,26 @@ +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>" +} + + { + 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 "}" } |