Factoring/simplifying the sources - NTP

This is a discussion on Factoring/simplifying the sources - NTP ; Well, I'd like to contribute to cleaning up the sources (it's a mania of mine ;-), but all I have access to for building (and not always testing in each case) is Linux FC5 on ia32 and x86_64 platforms... If ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Factoring/simplifying the sources

  1. Factoring/simplifying the sources

    Well, I'd like to contribute to cleaning up the sources (it's a mania of
    mine ;-), but all I have access to for building (and not always testing in
    each case) is Linux FC5 on ia32 and x86_64 platforms...

    If someone walks me through setting up and running Qemu I might
    be able to install FreeBSD or some other OS to build and test on
    that as well... but that's about it.

    My main concern isn't time, but rather making changes that work on
    my platform but break it for someone else.

    Unless the group has a cluster of servers that they can do hourly
    builds on from the trunk... Does it?

    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?

    Thanks,

    -Philip

    _______________________________________________
    questions mailing list
    questions@lists.ntp.isc.org
    https://lists.ntp.isc.org/mailman/listinfo/questions


  2. Re: Factoring/simplifying the sources

    Philip,

    Thanks a bunch - I'll send you private email so we can discuss this without
    boring lots of other people.

    H

  3. Re: Factoring/simplifying the sources

    On Sat, 9 Sep 2006 18:24:18 GMT in comp.protocols.time.ntp,
    philipp_subx@redfish-solutions.com (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

    Brian.Inglis@CSi.com (Brian[dot]Inglis{at}SystematicSW[dot]ab[dot]ca)
    fake address use address above to reply

+ Reply to Thread