Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ldclose(3X)

ldopen(3X)

ldtbindex(3X)

ldfcn(4)



ldlread(3X)                                           ldlread(3X)



NAME
     ldlread, ldlinit, ldlitem - manipulate line number entries
     of an object file function

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


     int ldlread(ldptr, fcnindx, linenum, linent)
     LDFILE *ldptr;
     long fcnindx;
     unsigned short linenum;
     LINENO *linent;

     int ldlinit(ldptr, fcnindx)
     LDFILE *ldptr;
     long fcnindx;

     int ldlitem(ldptr, linenum, linent)
     LDFILE *ldptr;
     unsigned short linenum;
     LINENO *linent;

DESCRIPTION
     ldlread searches the line number entries of the common
     object file currently associated with ldptr.  ldlread begins
     its search with the line number entry for the beginning of a
     function and confines its search to the line numbers associ-
     ated with a single function.  The function is identified by
     fcnindx, the index of its entry in the object file symbol
     table.  Ldlread reads the entry with the smallest line
     number equal to or greater than linenum into linent.

     Ldlinit and ldlitem together perform exactly the same func-
     tion as ldlread.  After an initial call to ldlread or
     ldlinit, ldlitem may be used to retrieve a series of line
     number entries associated with a single function.  Ldlinit
     simply locates the line number entries for the function
     identified by fcnindx. Ldlitem finds and reads the entry
     with the smallest line number equal to or greater than line-
     num into linent.

     ldlread, ldlinit, and ldlitem each return either SUCCESS or
     FAILURE.  ldlread will fail if there are no line number
     entries in the object file, if fcnindx does not index a
     function entry in the symbol table, or if it finds no line
     number equal to or greater than linenum.  Ldlinit will fail
     if there are no line number entries in the object file or if
     fcnindx does not index a function entry in the symbol table.



Page 1                        CX/UX Programmer's Reference Manual





ldlread(3X)                                           ldlread(3X)



     Ldlitem will fail if it finds no line number equal to or
     greater than linenum.

     The programs must be loaded with the object file access rou-
     tine library libld.a.

SEE ALSO
     ldclose(3X), ldopen(3X), ldtbindex(3X), ldfcn(4).















































Page 2                        CX/UX Programmer's Reference Manual



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