Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ xlate_pro_disk_header(3E) — IRIX 6.5.3f

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

libelfutil(5)

xlate(4)

xlate_pro_init(3e)

xlate_pro_finish(3e)

xlate_pro_disk_next_block(3e)



XLATEPRODISKHEADER(3E)                            XLATEPRODISKHEADER(3E)



NAME
     xlateprodiskheader - get translation byte stream block count

SYNOPSIS
     #include <elf.h>
     #include <libelf.h>
     #include <dwarf.h>
     #include <libdwarf.h>
     #include <cmplrs/xlate.h>
     #include <libXlate.h>

int xlateprodiskheader(xlatetablepro protableptr,
int standardordebug,
Elf64Xword *totalmemoryrequired,
Elf64Xword *numberofblocks
);
DESCRIPTION
This function gets the total size and the number-of-blocks of either the
standard or debug stream of data. Following this one calls
xlate_pro_disk_block number-of-blocks times to get pointers the blocks of
actual data bytes of the byte stream. The library does not write
anything to disk. It is up to the application calling the library to
write the information to disk (or to do whatever else is appropriate with
the byte stream).
xlate_pro_disk_header gets the size of the net translation table data
stream thru the pointer arguments.
If there are no translation ranges supplied but there is register
information supplied (or if there is a consumer translation table
supplied) an output stream may have non-zero length and block count but
such a stream is surely useless.
If there are no translations the block count and length will be returned
as 0 (see below).
The arguments are a as follows.
pro_table_ptr must be a valid open producer translate table handle.
standard_or_debug specifies whether the byte stream returned by calls to
xlate_pro_disk_next_block is the standard or debug stream. Call with
XLATE_PRO_STANDARD_SETUP to request the standard stream. Call with
XLATE_PRO_DEBUG_SETUP to request the debug stream.
total_memory_required
The pointed at memory is set to the total number of bytes in the
translation byte stream. If there is no translation data the
pointed at memory will be set to 0.
Page 1


XLATEPRODISKHEADER(3E)                            XLATEPRODISKHEADER(3E)



     number_of_blocks
             The pointed at memory is set to the number of calls of
             xlate_pro_disk_next_block required to get pointers to the pieces
             of the byte stream.  If there is no translation data the pointed
             at memory will be set to 0.

     An example showing typical use of these functions follows.

          res = xlateprodiskheader(protab,
                 XLATEPROSTANDARDSETUP,
                     &totmem,&blkct);
          for( i = 0; i < blkct; ++i )
          {
            res = xlateprodisknextblock(protab,
                      &datap,&datasize);
            /* do something with the bytes*/
            free(datap);
          }
          res = xlateprodiskheader(protab,
                 XLATEPRODEBUGSETUP
                     &totmemdebug,&blkctdebug);
          for( i = 0; i < blkctdebug; ++i )
          {
            res = xlateprodisknextblock(protab,
                  &datap,&datasize);
            /* do something with the bytes*/
            free(datap);
          }

FILES
     /usr/include/libXlate.h
     /usr/include/cmplrs/xlate.h
     /usr/include/elf.h
     /usr/include/dwarf.h
     /usr/include/libdwarf.h
     /usr/lib/libelfutil.a

DIAGNOSTICS
     This returns XLATE_TB_STATUS_NO_ERROR (0) on success.  In case of error,
     a negative number is returned indicating the error.  In case of error
     nothing is returned thru the pointer arguments.

     Error returns possible are:

     XLATE_TB_STATUS_INVALID_TABLE
             means that that the table is not a valid open producer handle.

     XLATE_TB_STATUS_PRO_REQ_INVALID
             means that the standard_or_debug argument is neither
             XLATE_PRO_STANDARD_SETUP nor XLATE_PRO_DEBUG_SETUP.





                                                                        Page 2





XLATEPRODISKHEADER(3E)                            XLATEPRODISKHEADER(3E)



SEE ALSO
     libelfutil(5), xlate(4), xlate_pro_init(3e), xlate_pro_finish(3e),
     xlate_pro_disk_next_block(3e),




















































                                                                        Page 3



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