#174057 trueprint: Doesn't print function index even when requested

Package:
trueprint
Source:
trueprint
Description:
pretty printing of source code
Submitter:
Paolo Redaelli
Date:
2005-07-18 03:41:43 UTC
Severity:
normal
#174057#5
Date:
2002-12-23 13:35:38 UTC
From:
To:
For example trying to print triangle.c with
trueprint triangle.c --language=c --function-index --intelligent-line-wrap  --holepunch -r --file-index --function-index
Doesn't print function index.
You can find triangle from http://www-2.cs.cmu.edu/~quake/triangle.html.
(Yes I know it is not GNU neither copyleft software..... I'll try to solve this)

#174057#10
Date:
2002-12-23 14:37:10 UTC
From:
To:
I have almost solved the problem passing that file throught the C preprocessor, keeping comment and don't printing "# statement", i.e.:
cpp -C -P  triangle.c cpptriangle.c
trueprint cpptriangle.c triangle.h --language=pseudoc --function-index --intelligent-line-wrap  --holepunch -s triangle.ps --file-index --function-index

The problem is that the original triangle.c is a magrovial forest of prepropressor directives (#ifdef, #else et cetera) which confuses trueprint.
Perhaps an option to filter sources with cpp would be useful.