Program Code

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • 150d
    Enthusiast
    • Dec 2008
    • 33

    Program Code

    Hi,

    I'm looking for a way to merge two programs (C-source). The code is semantically similar, but syntactically different. That is to say, there are "about the same" functions that do "about the same", but the code inside them may be more or less different.

    What I would like to do is this:

    Take two files, one of each program. Open a window for each file and have a list of functions in that file (written in C). Then select a function in the left window, one in the right window, and have BC compare these two functions side-by-side.

    My feeling is that this kind of handling goes beyond BC - it is not designed to scan a file for functions and isolate them. But can anyone think of a third-party-tool that can do this? If I could have the other tool create the function lists, I could probably script BC to open the file comparison at the lines specified by the other tool.

    Does this make sense to anyone? ;-)

    Regs,
    150d
  • Aaron
    Team Scooter
    • Oct 2007
    • 15941

    #2
    Hello,

    If you want to select and compare individual functions, you could select, copy each, and use the Open Clipboard command in the Text Compare.

    Or you can open both files in the Text Compare, and customize the File Format to give precidence to the Function name (by adding a Line Weight). You may have to try out different combinations of Alignment options (under the Session Settings) to get your files to align properly.

    You can test out all of these features in the trial version, available here:
    http://www.scootersoftware.com/download.php

    If you have any questions, please let us know. You can post or email specific example files to [email protected]
    Aaron P Scooter Software

    Comment

    Working...