No announcement yet.

Program Code

  • Filter
  • Time
  • Show
Clear All
new posts

  • Program Code


    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? ;-)


  • #2

    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:
    Beyond Compare is a multi-platform utility that combines directory compare and file compare functions in one package. Use it to manage source code, keep directories in sync, compare program output, etc.

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