On Sat, 9 Sep 2006 18:24:18 GMT in comp.protocols.time.ntp,
[EMAIL PROTECTED] (Philip Prindeville) wrote:

>Also, what cross-reference tools can be scripted to find duplicate
>function definitions and declarations (and maybe macros as well)
>so we can reduce the number of duplications of code?  Cscope?
>xref?  Is there a preferred methodology?

[ec]*tags would probably be adequate for finding duplicates. 
For ctags, -d adds #defines, -T adds typedefs and tags; -v vgrind or
-x cxref output formats may be easier to work with. 
I've use cxref to help clean up code before major surgery; presumably
cscope would work as well. 

With (suspected) dead code, I first put it inside #if 0...#endif,
check it still compiles and passes tests, check in the source, delete
the conditional code, check it still compiles and passes tests, check
in the source again; saves having to revert deleted code if you
misjudge. 

-- 
Thanks. Take care, Brian Inglis         Calgary, Alberta, Canada

[EMAIL PROTECTED]       (Brian[dot]Inglis{at}SystematicSW[dot]ab[dot]ca)
    fake address                use address above to reply

_______________________________________________
questions mailing list
[email protected]
https://lists.ntp.isc.org/mailman/listinfo/questions

Reply via email to