source: trunk/src/binutils/gprof/gen-c-prog.awk@ 10

Last change on this file since 10 was 10, checked in by bird, 22 years ago

Initial revision

  • Property cvs2svn:cvs-rev set to 1.1
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 568 bytes
Line 
1NR == 1 {
2 FS="\"";
3 print "/* ==> Do not modify this file!! It is created automatically"
4 printf " from %s using the gen-c-prog.awk script. <== */\n\n", FILE
5 print "#include <stdio.h>"
6}
7
8 {
9 if (curfun != FUNCTION)
10 {
11 if (curfun)
12 print "}"
13 curfun = FUNCTION
14 print ""
15 print "void";
16 printf "%s (file)\n", FUNCTION
17 print " FILE *file;";
18 print "{";
19 }
20 printf " fputs (\"";
21 for (i = 1; i < NF; i++)
22 printf "%s\\\"", $i;
23 printf "%s\\n\", file);\n", $NF;
24}
25
26END { print "}" }
Note: See TracBrowser for help on using the repository browser.