Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

NAME_$EXTRACT_DATA_LC             Domain/OS              NAME_$EXTRACT_DATA_LC


NAME
     name_$extract_data_lc - extract data from a canonical directory entry

SYNOPSIS (C)
     #include <apollo/base.h>
     #include <apollo/name.h>

     void name_$extract_data_lc(
          name_$canonical_dir_entry_t &dir_data,
          short *enttype,
          unsigned short *entlen,
          unsigned short &max_entlen,
          char *entname,
          status_$t *status)

SYNOPSIS (Pascal)
     %include '/sys/ins/base.ins.pas';
     %include '/sys/ins/name.ins.pas';

     procedure name_$extract_data_lc(
          in dir_data: univ name_$canonical_dir_entry_t;
          out enttype: integer;
          out entlen: integer;
          in max_entlen: pinteger;
          out entname: univ name_$long_name_t;
          out status: status_$t);

SYNOPSIS (FORTRAN)
     %include '/sys/ins/base.ins.ftn'
     %include '/sys/ins/name.ins.ftn'

           character dir_data*278, entname*255
           integer*2 enttype, entlen, max_entlen

           integer*4 status

           call name_$extract_data(dir_data, enttype, entlen,
          &                        max_entlen, entname, status)

DESCRIPTION
     Name_$extract_data_lc extracts the enttype, entlen, and entname fields
     from the canonical directory entry passed to it in dir_data.  A program
     reads data into dir_data by calling name_$read_dir_lc with the max_count
     argument set to 1.

     Name_$read_dir_lc returns canonical directory entries in variable length
     records of type name_$canonical_dir_entry_t.  Because FORTRAN does not
     have built-in support for records, FORTRAN programmers must either use
     equivalences to extract fields from records or use name_$extract_data_lc
     to extract fields.  (The FORTRAN synopsis for name_$read_dir_lc gives
     sample equivalences.)  Since C and Pascal support variable-length
     records, C and Pascal programmers have no need for name_$extract_data_lc.

     dir_data
          A canonical directory entry as obtained from name_$read_dir_lc.
          This is a record whose length varies between 23 and 278 bytes.

     enttype
          The value of the enttype field of dir_data; that is, the type of
          entry that dir_data is.  Enttype will contain one of the following
          values:

          name_$file
               The entry is for a file.

          name_$link
               The entry is a link.

     entlen
          The value of the entlen field of dir_data; that is, the number of
          bytes in the entname field of dir_data.

     max_entlen
          The number of bytes available in entname to receive the entname
          field of dir_data.  Name_$extract_data_lc will write no more than
          max_entlen bytes into entname.  If the number that
          name_$extract_data_lc returns in entlen is less than the number sup-
          plied in max_entlen, then entname will not contain all of the
          entname field of dir_data.

     entname
          The directory entry name.  The string supplied in entname is up to
          max_entlen bytes of the entname field of dir_data.  The entire
          entname field of dir_data is entlen bytes long.  Consequently, if
          the value supplied in entlen is greater than max_entlen, then
          entname will not contain the entire directory entry name, and status
          will be set to name_$leaf_truncated.

     status
          The completion status.

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