... and make it return the *right* value when it goes out of bounds.
[deliverable/binutils-gdb.git] / gprof / make-c-prog.awk
CommitLineData
9388476b
JG
1BEGIN {
2 FS="\"";
3 print "/* ==> Do not modify this file!! It is created automatically"
4 print " by make-c-prog.awk; modify make-c-prog.awk instead. <== */"
5 print ""
6 print "#include <stdio.h>"
7 }
8
9 {
10 if (curfun != FUNCTION)
11 {
12 if (curfun)
13 print "}"
14 curfun = FUNCTION
15 print ""
16 print "void";
17 printf "%s (file)\n", FUNCTION
18 print " FILE *file;";
19 print "{";
20 }
21 printf " fputs (\"";
22 for (i = 1; i < NF; i++)
23 printf "%s\\\"", $i;
24 printf "%s\\n\", file);\n", $NF;
25 }
26
27END {
28 print "}"
29 }
This page took 0.023538 seconds and 4 git commands to generate.