LR_TEST - conditionally open an LD input file.

Usage:

#include <ld.h>
ret = lr_test(filename,min_version,max_version,target);

Where:

char *filename;
is the name of the LD file to be opened.
unsigned min_version;
is an integer indicating the earliest version of the LD format that the calling program is prepared to handle. If the version given in the LC_LDVERSION directive at the beginning of the file is earlier than "min_version", "lr_test" will return FALSE.
unsigned max_version;
is similar to "min_version", but states the latest version of the LD format that the calling program is prepared to handle.
char *target;
is a string containing the name of the target machine. This argument can also be NULL.
int ret;
is zero if "lr_test" fails to read the file, and non-zero otherwise.

Description:

"lr_test" is similar to the "lr_open" function in that it attempts to open a file as the LD input file. The difference is that "lr_open" terminates the program if the file's version number falls outside the given range, or if the file's target machine name does not match the "target" argument. If "lr_test" fails, it just returns zero.

See Also:

expl ld lib lr_open

Copyright © 1996, Thinkage Ltd.