On Monday 08 March 2010 11:25:03 pm Adrian Lienhard wrote:
The second issue was that the gawk output didn't compile because the jump table macros were all like "CASE(0)", i.e., the argument was not incremented. In cmake/gnuify.awk I commented out the line print " CASE(" (($NF) + 0) ")"; and commented in the line print " CASE(" $3 ")";
$NF is an awk idiom for the last word in input line. The code works if input source has lines like: case 255: But if there are intervening comment words or spaces between number and colon, then the code will break. E.g. case /*RETURN*/ 254 :
What did the input line look like in this case?
Subbu