funcname1.awk 122 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10
BEGIN { n=0 }
/^#/ {next}
{
  if (cmd[$2] == "") {
    print "#define FUNCNAME_" $2 " " n;
    cmd[$2] = n;
  }
  n++;
}