Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ldclose(S) — OpenDesktop Software Development System 3.0.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ldfcn(FP)

ldopen(S)


 ldclose(S)                     6 January 1993                     ldclose(S)


 Name

    ldclose, ldaclose - close a common object file and free memory

 Syntax


    cc  . . .  -lld


    #include  <stdio.h>
    #include  <filehdr.h>
    #include  <ldfcn.h>

    int ldclose (ldptr)
    LDFILE *ldptr;

    int ldaclose (ldptr)
    LDFILE *ldptr;


 Description

    The ldopen and ldclose functions 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(S).
    In all other cases, ldclose returns SUCCESS.

    ldaclose closes the file and frees the memory allocated to the LDFILE
    structure associated with ldptr regardless of the value of TYPE(ldptr).
    ldaclose always returns SUCCESS.  The function is often used in conjunc-
    tion with ldaopen.

    The program must be loaded with the object file access routine library

 See also

    ldfcn(FP), ldopen(S)

 Standards conformance

    ldclose and ldaclose are not part of any currently supported standard;
    they are an extension of AT&T System V provided by the Santa Cruz Opera-
    tion.


Typewritten Software • bear@typewritten.org • Edmonds, WA 98026