Announcement

Collapse
No announcement yet.

Syncing C++ resource files

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Aaron
    replied
    In the current version of Beyond Compare, line breaks in the Text Compare are always important to the comparison. We align line by line, then compare the text within the line, so if text is split across two lines that will always be a difference.

    To help with this, we have the ability to perform an External Conversion, which can tidy code and make the line breaks in the same spots for both files. This uses any command line program capable of this tidy behavior. We have a few for Java, HTML, and XML on our Downloads page -> Additional file format Downloads. You can also use any other command line program; we have an example here:
    http://www.scootersoftware.com/suppo...rnalconversion

    Leave a comment:


  • andwan0
    started a topic Syncing C++ resource files

    Syncing C++ resource files

    This is going to be hard to describe but I'll try my best.

    Comparing two Visual C++ RC files. Sometimes RC files get slightly reformatted by different versions of Visual C++, plus the X-Y co-ordinates/sizes will be different. The objective is to compare the X-Y co-ordinates/sizes when they might be "wrapped" across lines delimited by commas or | bar.

    Code:
    IDD_EXAMPLE DIALOG 100, 100, 100, 100
    BEGIN
        PUSHBUTTON    "Example",IDC_EXAMPLE,10,10,10,10
    END
    Variation #1
    Code:
    IDD_EXAMPLE DIALOG 100, 100, 100, 100
    BEGIN
        PUSHBUTTON    "Example",IDC_EXAMPLE,20,30,
        40,50
    END
    Variation #2
    Code:
    IDD_EXAMPLE DIALOG 100, 100, 100, 100
    BEGIN
        PUSHBUTTON    "Example",
        IDC_EXAMPLE,60,70,80,
        90
    END
    Would be useful to have a tidy/reformat one side (left or right) to be aligned with the other side. This would be based on commas or | bar.

    Is this possible to do?



    Here's an example

    LEFT SIDE:
    CONTROL "something",
    IDC_PARENTCHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,
    232,153,226,10

    RIGHT SIDE:
    CONTROL "something",IDC_PARENTCHECK,
    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,666,999,
    226,10
    Let's say we want to match the layout of the right-side... then the left-side would need to move/shift IDC_PARENTCHECK up one line... and also the two numbers 232,153, only (but notice the numbers do not match left-right sides)













    -------------

    Manually doing this.
    Each component can span/wrap over several lines, and each has variable amounts of commas and/or | bars.

    Code:
    BEGIN
        COMPONENT1    <parameter list
                                       delimited by commas & bars>
        COMPONENT2    <parameter list
                                       delimited by
                                      commas & bars>
        COMPONENT3    <parameter list delimited by
                                      commas & bars>
    END
    For each component, compare the number of tokens in the parameter list for line 1. Shift tokens about between line 1 & 2 so that it matches the other side. Goto next line and repeat....
    Last edited by andwan0; 10-Mar-2015, 11:39 AM.
Working...
X