.\" @(#)ldahread.3x 1.16 90/02/15 SMI; from SVID
.TH LDAHREAD 3X "19 February 1988"
.SH NAME
ldahread \- read the archive header of a member of a COFF archive file 
.SH SYNOPSIS
.nf
.ta \w'\s-1LDFILE\s+1\ \ \ 'u
.ft B
#include <stdio.h>
#include <ar.h>
#include <filehdr.h>
#include <ldfcn.h>
.PP
.B int ldahread (ldptr, arhead)
.B \s-1LDFILE\s+1 \(**ldptr;
.B \s-1ARCHDR\s+1 \(**arhead;
.ft R
.fi
.DT
.SH AVAILABILITY
.LP
Available only on Sun 386i systems running a SunOS 4.0.\fIx\fR
release or earlier.  Not a SunOS 4.1 release feature.
.SH DESCRIPTION
.IX "ldahread() read" "" "\fLldahread()\fR \(em read archive header of \s-1COFF\s0 file"
.IX "COFF file" "read archive header"
.IX "read" "archive header of COFF file"
.IX "archive header" "read for COFF file"
.IX header "read for COFF file"
If 
.BI \s-1TYPE\s+1( ldptr )
is the archive file magic number,
.B ldahread
reads the archive header of the
.SM COFF
file currently associated with
.I ldptr
into the area of memory beginning at
.IR arhead .
.PP
.B ldahread
.RB "returns " \s-1SUCCESS\s+1 " or " \s-1FAILURE\s+1 .
.B ldahread
will fail if 
.BI \s-1TYPE\s+1( ldptr )
does not represent an archive file,
or if it cannot read the archive header.
.PP
The program must be loaded with the object file access routine library
.BR libld.a .
.SH SEE ALSO
.BR ldclose (3X),
.BR ldfcn (3),
.BR ldopen (3X),
.BR intro (5)
