aboutsummaryrefslogtreecommitdiff
path: root/gprof/make-c-prog.awk
diff options
context:
space:
mode:
authorJohn Gilmore <gnu@cygnus>1992-07-13 02:24:24 +0000
committerJohn Gilmore <gnu@cygnus>1992-07-13 02:24:24 +0000
commit9388476b43b2b36431b06d3ba53e27087b98839f (patch)
treeb6e0941676d54efcf092fb2780201a273320e5b3 /gprof/make-c-prog.awk
parentf8f1415a4af940e1c64ad75102916ecda459aa42 (diff)
downloadgdb-9388476b43b2b36431b06d3ba53e27087b98839f.zip
gdb-9388476b43b2b36431b06d3ba53e27087b98839f.tar.gz
gdb-9388476b43b2b36431b06d3ba53e27087b98839f.tar.bz2
* blurbs.c: New file, created from gprof.flat and gprof.callg by
* make-c-prog.awk: which processes text files into C programs. * printgprof.c (flatprofheader, gprofheader): Call new functions to print blurbs. (printblurb): Remove. * Makefile.in: Infrastructure to build blurbs. * pathnames.h: has been removed. Gprof now has no filename dependencies in it. * gprof.c: Lint. Sat Jul 11 18:07:21 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com) * Makefile.in: define man1dir and install the man page Fri Jul 10 21:14:08 1992 david d `zoo' zuhn (zoo@cygnus.com) * Makefile.in: added dummy info and install-info targets
Diffstat (limited to 'gprof/make-c-prog.awk')
-rw-r--r--gprof/make-c-prog.awk29
1 files changed, 29 insertions, 0 deletions
diff --git a/gprof/make-c-prog.awk b/gprof/make-c-prog.awk
new file mode 100644
index 0000000..a0a49de
--- /dev/null
+++ b/gprof/make-c-prog.awk
@@ -0,0 +1,29 @@
+BEGIN {
+ FS="\"";
+ print "/* ==> Do not modify this file!! It is created automatically"
+ print " by make-c-prog.awk; modify make-c-prog.awk instead. <== */"
+ print ""
+ 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 "}"
+ }