Tools: MPW
Advanced Search
Apple Developer Connection
Member Login Log In | Not a Member? Support

MPW Command Reference


ResEqual

Tool

SYNTAX

ResEqual file1 file2 [-attr] [-fFlags] [-noResolve]
[-only type[,type]… | -skip type[,type]…] [-p] [-rFlags]

DESCRIPTION

The ResEqual tool compares the resource attributes, file attributes, Finder flags, and resource contents of two files and writes their differences to standard output. In comparing files, ResEqual first checks that each file contains resources of the same type and identifier. (Resources that exist in one file but not the other are reported as differences.) It then makes a one-to-one comparison between corresponding resources to ensure that the attributes, Finder flags, and resource contents are the same. Using the options to this command, you can process resources of only a certain type (-only type[,type]…) or you can tell ResEqual to skip comparisons of

file attributes (-attr)

Finder flags (-fFlags)

resource attributes (-rFlags)

resources of certain types (-skip type[,type]…)

INPUT

Two resource files, file1 and file2. ResEqual does not accept standard input.

OUTPUT

Standard output. ResEqual reports to standard output differences between the resources in two files, referring to the first input file (file1) as 1 and the second input file (file2) as 2.

The following messages can appear when reporting differences:

Message

Additional information

In 1 but not in 2

The resource type and ID

In 2 but not in 1

The resource type and ID

Resources are different sizes

The resource type, ID, and names

Resources have different names

The resource type, ID, and names

Resources have different contents

The resource type and ID

Contents of resource in file 1 at offset n

The offset of the differing bytes (relative to the start of the resource) and 16 bytes at the offset

Contents of resource in file 2 at offset n

The offset of the differing bytes (relative to the start of the resource) and 16 bytes at the offset

ALIAS RESOLUTION

This command resolves Finder aliases (including leaf aliases) in the input specifications. You can override this behavior by using the -noResolve option.

STATUS

ResEqual can return the following status codes:

0

resources equal

1

parameter or option error

2

resources not equal

PARAMETERS

file1

Specifies the first resource file.

file2

Specifies the second resource file.

OPTIONS

-attr

Skips comparison of file attributes.

-fFlags

Skips comparison of Finder flags.

-noResolve

Does not resolve leaf aliases in the input file paths. This allows two Finder alias files to be compared.

-only type[,type]…

Processes only resources of the specified type.

-p

Writes progress information to diagnostic output.

-rFlags

Skips comparison of resource attributes.

-skip type[,type]…

Skips resources of the specified type.

EXAMPLES

The following command line compares the resources in Count.c and Count.c.Revision and writes the results to standard output:

Resequal Count.c Count.c.Revision

File #1: Count.c
File #2: Count.c.Revision

Resources have different contents
Resource Type = "MPSR"  ID = 1005
Contents of resource in file 1 at offset 40
00 07 01 AA 01 C6 00 29 00 07 01 AA 01 C6 A4 99 .......)........
Contents of resource in file 2 at offset 40
01 42 01 6A 02 79 00 29 01 42 01 6A 02 79 A4 99 .B.j.y.).B.j.y..

LIMITATIONS

When reporting differences between two resources of the same type, ID, and size, ResEqual displays the first byte at which they differ and the subsequent 15 bytes. It then continues the comparison, starting with the byte following the last byte displayed.

If ResEqual detects more than ten differences in the same resource, it skips the rest of the resource and continues with the next resource.

SEE ALSO

Equal   The -r option of Equal compares the resource forks of files on a byte-by-byte basis, including the resource map.

 
 


Last Updated July 2000