LDCLOSE(3x,L) AIX Technical Reference LDCLOSE(3x,L) ------------------------------------------------------------------------------- ldclose, ldaclose PURPOSE Closes a common object file. LIBRARY Object File Access Routine Library (libld.a) SYNTAX #include #include #include #include int ldclose (ldptr) LDFILE *ldptr; int ldaclose (ldptr) LDFILE *ldptr; DESCRIPTION The ldopen and ldclose subroutines are designed to provide uniform access to both simple object files and object files that are members of archive files. Thus, an archive of common object files can be processed as if it were a series of simple common object files. If TYPE(ldptr) does not represent an archive file, ldclose closes the file and frees the memory allocated to the LDFILE structure associated with ldptr. If TYPE(ldptr) is the magic number of an archive file, and if there are any more files in the archive, ldclose reinitializes OFFSET(ldptr) to the file address of the next archive member and returns FAILURE. The LDFILE structure is prepared for a subsequent ldopen. In all other cases, ldclose returns SUCCESS. The ldaclose subroutine closes the file and frees the memory allocated to the LDFILE structure associated with ldptr regardless of the value of TYPE(ldptr). The function is often used in conjunction with ldaopen. If ldaclose cannot find the LDFILE structure associated with ldptr, then it returns FAILURE. In all other cases, ldaclose returns SUCCESS. RELATED INFORMATION In this book: "ldfcn" and "ldopen, ldaopen." Processed November 7, 1990 LDCLOSE(3x,L) 1