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 a directory entry

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

     void name_$extract_data_lc(
          name_$canonical_dir_entry_t &canonical_entry,
          short *enttype,
          unsigned short *entlen,
          unsigned short &maxentlen,
          name_$long_name_t *entname,
          status_$t *status)

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

     procedure name_$extract_data_lc(
          in canonical_entry: univ name_$canonical_dir_entry_t;
          out enttype: integer;
          out entlen: integer;
          in maxentlen: 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 canonical_entry*278, entname*255
           integer*2 enttype, entlen, maxentlen

           integer*4 status

           equivalence (enttype, canonical_entry(3, 4))
           equivalence (entlen, canonical_entry(21, 22))
           equivalence (entname, canonical_entry(23, 278))

           call name_$extract_data(canonical_entry, enttype, entlen,
          &                        maxentlen, entname, status)

DESCRIPTION
     Name_$extract_data_lc extracts the enttype, entlen, and entname fields
     from the canonical directory entry passed to it in canonical_entry.

     Name_$read_dir_lc returns canonical directory entries in variable length
     records of type name_$canonical_dir_entry_t.  The constituent fields of a
     canonical directory entry can be referenced directly from C or Pascal, so
     name_$extract_data_lc will be most useful to FORTRAN programmers.

     canonical_entry
          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 canonical_entry; that is, the type
          of entry that canonical_entry is.  Enttype will contain one of the
          following values:

          name_$file
               The entry is for a file.

          name_$link
               The entry is a link.

          In C or Pascal, name_$extract_data_lc just supplies
          canonical_entry.enttype in enttype.

     entlen
          The value of the entlen field of canonical_entry; that is, the
          number of bytes in the entname field of canonical_entry.  In C or
          Pascal, name_$extract_data_lc just supplies canonical_entry.entlen
          in entlen.

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

     entname
          The directory entry name.  The string supplied in entname is up to
          maxentlen bytes of the entname field of canonical_entry.  The entire
          entname field of canonical_entry is entlen bytes long.  Conse-
          quently, if the value supplied in entlen is greater than maxentlen,
          then entname will not contain the entire directory entry name.  In C
          or Pascal, name_$extract_data_lc just supplies up to maxentlen bytes
          of canonical_entry.entname in entname.

     status
          The completion status.

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