From:	CRDGW2::CRDGW2::MRGATE::"SMTP::CRVAX.SRI.COM::RELAY-INFO-VAX" 18-SEP-1989 10:33
To:	MRGATE::"ARISIA::EVERHART"
Subj:	VMS TAR v1.1   part 6 of 6

Received: From UCBVAX.BERKELEY.EDU by GIZMO.SRI.COM with TCP; Mon, 18 SEP 89 06:35:07 PDT
Received: by ucbvax.Berkeley.EDU (5.61/1.37)
	id AA29085; Mon, 18 Sep 89 06:25:36 -0700
Received: from USENET by ucbvax.Berkeley.EDU with netnews
	for info-vax@kl.sri.com (info-vax@kl.sri.com)
	(contact usenet@ucbvax.Berkeley.EDU if you have questions)
Date: 15 Sep 89 18:21:00 GMT
From: murtoa.cs.mu.oz.au!viccol!timcc@uunet.uu.net  (Tim Cook)
Organization: Computer Services, Victoria College, Melbourne
Subject: VMS TAR v1.1   part 6 of 6
Message-Id: <1966@csv.viccol.edu.au>
Sender: info-vax-request@kl.sri.com
To: info-vax@kl.sri.com

-+-+-+-+-+-+-+-+ START OF PART 6 -+-+-+-+-+-+-+-+
X            truncate (archive) ;
X            write_message := tar__appended END ;
X         files_written := 0 ;
X         pending_directory := '' ;
X         prefix := '' ;
X         IF map_mode = prefix_mode THEN
X            IF CLI$PRESENT (filespec_kt) = CLI$_DEFAULTED THEN
X               map_mode := single_dir_mode
X            ELSE BEGIN
X               collect_filespecs (prefix) ;
X               filespecs_in_storage := true END ;
X         more := true ;
X         WHILE another_file (current_file) AND more DO
X            IF is_directory (current_file) THEN BEGIN
X               current_file.length := current_file.length - 6 ;
X               IF confirm THEN
X                  pending_directory := current_file
X               ELSE
X                  load_directory (current_file) END
X            ELSE
X               IF confirm_operation (option, current_file, NOT confirm,
X                     set_this_false, more) THEN BEGIN
X                  IF pending_directory.length > 0 THEN
X                     IF pending_directory = substr (current_file, 1,
X                           pending_directory.length) THEN
X                        load_directory (pending_directory) ;
X                  open_input_file (current_file, record_format, record_lengt
Vh,
X                     eof_block, first_free_byte, modification_date,
X                     protection) ;
X                  last_char := 0 ;
X                  no_records := 0 ;
X                  file_size := 0 ;
X                  IF record_format IN `091FAB$C_FIX, FAB$C_UDF`093 THEN
X                     load_direct
X                  ELSE
X                     IF scan THEN
X                        load_after_scan
X                     ELSE
X                        load_from_temp ;
X                  files_written := files_written + 1 ;
X                  LIB$SIGNAL (write_message, 2, %STDESCR (current_file),
X                     file_size) ;
X                  `123 file built and written `125
X                  status := $CLOSE (in_fab) ;
X                  IF failure (status) THEN
X                     LIB$STOP (tar__close, 1, %STDESCR (current_file),
X                        status, in_fab.FAB$L_STV) ;
X               END ;  `123 IF confirmed `125
X
X         IF files_written > 0 THEN
X            IF appending THEN
X               LIB$SIGNAL (tar__totappend, 1, files_written)
X            ELSE
X               LIB$SIGNAL (tar__totwrite, 1, files_written) ;
X         FOR i := 1 TO record_size DO
X            archive`094.data`091i`093 := null ;
X         put (archive) ; put (archive) ;     `123 emulate tar's personal eof
V `125
X         IF archive_temp_open THEN BEGIN
X            close (archive_temp, disposition := DELETE) ;
X            archive_temp_open := false END ;
X         close (archive) ;
X         END ;    `123 tar_write `125
X
X
X   `091GLOBAL`093 PROCEDURE tar_append (
X      VAR archive_filespec : `091READONLY`093 filespec_type ;
X      confirm : boolean ;
X      scan : boolean ;
X      map_mode : map_mode_type) ;
X
X      VAR
X         archive_size : unsigned ;
X         more, doit : boolean ;
X         fab : fab_pointer ;
X
X      BEGIN    `123 tar_append `125
X         open_archive_input (archive_filespec) ;
X         fab := PAS$FAB (archive) ;
X         IF (fab`094.FAB$B_RFM <> FAB$C_FIX) OR (fab`094.FAB$W_MRS <> record
V_size)
X         THEN
X            LIB$STOP (tar__badarchive) ;
X
X         more := true ;
X         WHILE more DO
X            IF eof (archive) THEN
X               more := false
X            ELSE
X               IF is_valid_header (archive`094) THEN
X                  more := scan_to_next_header
X               ELSE
X                  more := false ;
X
X         doit := false ;
X         IF eof (archive) THEN
X            doit := true
X         ELSE
X            IF checksum (archive`094) = 0 THEN
X               doit := true ;
X         IF doit THEN
X            tar_write ('', confirm, scan, map_mode, appending := true)
X         ELSE
X            LIB$STOP (tar__badarchive) ;
X         END ;    `123 tar_append `125
X
X
X   END.
$ CALL UNPACK TAR_WRITE.PAS;1 426917591
$ create/nolog 'f'
X`123
X! VCDEFS.PAS -`009VCLIB definitions needed by TAR
X!
X! This file contains all definitions needed by TAR when packaged for
X! external distribution.  When TAR is built locally, these definitions
X! come from SRC_VCLIB:VCLIB.PEN, but for the distribution package, I
X! have extracted the needed definitions from the appropriate files in
X! SRC_VCLIB:  Any routines defined in here but not coded in here will
X! be in appropriately named MACRO source files.
X!
X! This file can be used to build an evironment and object file to be used
X! when building TAR, or it can be %INCLUDEd by TAR.PAS, or it can be
X! /INSERTed into a help library.
X!
X! Tim Cook, 24-FEB-1989
X!--------------------------------------------------------------
X!`125 `091INHERIT ('SYS$LIBRARY:STARLET'), ENVIRONMENT ('VCDEFS')`093 `123
X!`125 MODULE vclib ; `123
X!
X! From SRC_VCLIB:LIBDEF.PAS
X!
X1 LIBDEFPAS
X2 CONST
X!`125 CONST
X      lib_k_maxbyte = %xFF ;
X      lib_k_maxword = %xFFFF ;
X      lib_k_maxlong = %xFFFFFFFF ;`123
X2 TYPE
X!`125 TYPE
X      sts_type = integer ;
X      lib_lo_hi = (low, high) ;
X      lib_byte_type = `091BYTE`093 0..lib_k_maxbyte ;
X      lib_word_type = `091WORD`093 0..lib_k_maxword ;
X      lib_signed_word_type = `091WORD`093 -%x8000..%x7FFF ;
X      lib_long_type = `091LONG`093 unsigned ;
X      lib_3byte_type = `091BYTE(3)`093 0..%xFFFFFF ;
X      lib_quad_type = `091QUAD`093 ARRAY `091low..high`093 OF unsigned ;
X      lib_signed_quad_type = `091QUAD`093 RECORD CASE integer OF
X0:(      lo : unsigned ;
X         hi : integer) ;
X1:(      value : `091QUAD`093 PACKED SET OF 0..63) END ;
X      lib_date_type = lib_signed_quad_type ;
X      prv_type = `091QUAD`093 PACKED SET OF 0..63 ;
X      lib_long_set_type = `091LONG`093 SET OF 0..31 ;
X      lib_sigargs_type = RECORD
X         param_count : unsigned ;
X         condition : sts_type ;
X         parameter : ARRAY `0911..20`093 OF unsigned END ;
X      lib_mechargs_type = RECORD
X         param_count : unsigned ;
X         stack_frame_address : unsigned ;
X         stack_frame_depth : unsigned ;
X         r0, r1 : unsigned END ;
X      lib_fab_pointer = `094FAB$TYPE ;
X      lib_numtim_type = RECORD
X         year, month, day,
X         hour, minute, second, hundredth : lib_word_type ; END ;
X      lib_item_type = RECORD
X         buffer_length : lib_word_type ;
X         item_code : lib_word_type ;
X         buffer_address : lib_long_type ;
X         retlength_adress : lib_long_type END ;
X      lib_extended_item_type = RECORD
X         item : lib_item_type ;
X         buffer : PACKED ARRAY `0911..80`093 OF char END ;
X      lib_item_list_type = ARRAY `0911..85`093 OF lib_item_type ;
X
X      fab_pointer = `094FAB$TYPE ;
X      rab_pointer = `094RAB$TYPE ;
X      nam_pointer = `094NAM$TYPE ;
X      nam_rs_type = PACKED ARRAY `0911..NAM$C_MAXRSS`093 OF char ;
X      nam_rsa_type = `094nam_rs_type ;
X      xab_pointer = `094XAB$TYPE ;`123
X2  DEC_Routines
X!`125
X   `091ASYNCHRONOUS,EXTERNAL`093 FUNCTION lib$create_dir (
X      directory_spec : `091CLASS_S`093 PACKED ARRAY `091l1..u1:integer`093 O
VF char ;
X      %REF owner_UIC : `091TRUNCATE,UNSAFE`093 unsigned := %IMMED 0 ;
X      %REF protection_enable : `091UNSAFE`093 lib_word_type := %IMMED 0 ;
X      %REF protection_value : `091UNSAFE`093 lib_word_type := %IMMED 0 ;
X      %REF maximum_versions : lib_word_type := %IMMED 0 ;
X      %REF relative_volume_number : lib_word_type := %IMMED 0)
X         : sts_type ; external ;`123
X! Now I convert to a H_FLOAT and divide instead
X!  `091ASYNCHRONOUS,EXTERNAL`093 FUNCTION lib$cvt_from_internal_time (
X!     %REF operation : unsigned ;
X!     VAR resultant_time : unsigned ;
X!      %REF input_time : `091UNSAFE`093 lib_date_type := %IMMED 0)
X!        : sts_type ; external ;`125
X
X   `091ASYNCHRONOUS,EXTERNAL`093 FUNCTION lib$cvt_vectim (
X      %REF input_time : `091UNSAFE`093 lib_numtim_type ;
X      VAR resultant_time : `091UNSAFE`093 lib_date_type) : sts_type ; extern
Val ;
X
X   `091ASYNCHRONOUS,EXTERNAL`093 FUNCTION lib$find_file (
X      filespec : `091CLASS_S`093 PACKED ARRAY `091l1..u1:integer`093 OF char
V ;
X      %DESCR resultant_filespec : `091VOLATILE`093 VARYING `091n1`093 OF cha
Vr ;
X      VAR context : `091VOLATILE`093 lib_fab_pointer ;
X      default_filespec :
X         `091CLASS_S`093 PACKED ARRAY `091l3..u3:integer`093 OF char := %IMM
VED 0 ;
X      related_filespec :
X         `091CLASS_S`093 PACKED ARRAY `091l4..u4:integer`093 OF char := %IMM
VED 0 ;
X      VAR status_value : `091VOLATILE`093 unsigned := %IMMED 0 ;
X      flags : unsigned := %IMMED 0) : sts_type ; external ;
X
X   `091ASYNCHRONOUS,EXTERNAL`093 FUNCTION lib$find_file_end (
X      VAR context : lib_fab_pointer) : sts_type ; external ;
X
X   `091ASYNCHRONOUS,EXTERNAL`093 FUNCTION lib$get_input (
X      %DESCR get_str : VARYING `091n1`093 OF char ;
X      prompt : `091CLASS_S`093 PACKED ARRAY `091l1..u1:integer`093 OF char :
V= %IMMED 0 ;
X      VAR out_len : lib_word_type := %IMMED 0) : sts_type ; external ;
X
X   `091ASYNCHRONOUS,EXTERNAL`093 FUNCTION lib$getjpi (
X      %REF item_code : lib_word_type ;
X      VAR process_id : unsigned := %IMMED 0 ;
X      process_name :
X         `091CLASS_S`093 PACKED ARRAY `091l1..u1:integer`093 OF char := %IMM
VED 0 ;
X      VAR resultant_value : `091UNSAFE`093 unsigned := %IMMED 0 ;
X      %DESCR resultant_string : VARYING `091n1`093 OF char := %IMMED 0 ;
X      VAR resultant_length : lib_word_type := %IMMED 0)
X         : sts_type ; external ;`123
X! I now use lib$subx instead
X!  `091ASYNCHRONOUS,EXTERNAL`093 FUNCTION lib$sub_times (
X!     %REF time_1, time_2 : `091UNSAFE`093 lib_date_type ;
X!     VAR resultant_time : `091UNSAFE`093 lib_date_type) : sts_type ; extern
Val ;`125
X
X   `091ASYNCHRONOUS,EXTERNAL`093 FUNCTION lib$subx (
X      %REF minuend_array : `091UNSAFE`093 ARRAY `091l1..u1:integer`093 OF un
Vsigned ;
X      %REF subtrahend_array : `091UNSAFE`093 ARRAY `091l2..u2:integer`093 OF
V unsigned ;
X      %REF difference_array :
X         `091UNSAFE,VOLATILE`093 ARRAY `091l3..u3:integer`093 OF unsigned ;
X      %REF array_length : integer := %IMMED 0) : sts_type ; external ;
X
X   `091ASYNCHRONOUS,EXTERNAL`093 FUNCTION lib$sys_fao (
X      ctr_str : `091CLASS_S`093 PACKED ARRAY `091l1..u1:integer`093 OF char
V ;
X      %REF out_len : lib_word_type := %IMMED 0 ;
X      %DESCR out_buf : VARYING `091n1`093 OF char ;
X      %IMMED p : `091LIST`093 unsigned) : sts_type ; external ;
X
X   `091ASYNCHRONOUS,EXTERNAL`093 PROCEDURE lib$signal (
X      %IMMED condition : `091UNSAFE`093 sts_type ;
X      %IMMED parameters : `091UNSAFE,LIST`093 unsigned) ; external ;
X
X   `091ASYNCHRONOUS,EXTERNAL`093 PROCEDURE lib$stop (
X      %IMMED condition : `091UNSAFE`093 sts_type ;
X      %IMMED parameters : `091UNSAFE,LIST`093 unsigned) ; external ;`123
X!
X! From nowhere in particular
X!
X1 SYSDEFPAS
X2 DEC_Routines
X!`125
X   `091ASYNCHRONOUS,EXTERNAL`093 FUNCTION SYS$SETDFPROT (
X      %REF new_def_prot : lib_word_type := %IMMED 0 ;
X      VAR cur_def_prot : lib_word_type := %IMMED 0) : sts_type ; external ;`
V123
X!
X! Again from nowhere
X!
X1 SHELLDEFPAS
X2 DEC_Routines
XSHELL$MATCH_WILD is an entry point contained in SYS$LIBRARY:VAXCRTL.EXE (and
Xpresumably .OLB).  I understand that it is part of DEC/Shell, a DEC version
Xof the System 7 Bourne shell for VMS.  I haven't found any documentation on
Xit, but have discovered how to use it through a few guesses and some
Xexperimentation.
X!`125
X
X   `091EXTERNAL,ASYNCHRONOUS`093 FUNCTION SHELL$MATCH_WILD (
X      %REF cand_spec : PACKED ARRAY `091l1..u1:integer`093 OF char ;
X      %REF match_spec : PACKED ARRAY `091l2..u2:integer`093 OF char)
X         : boolean ; external ;`123
X!
X! From SRC_VCLIB:CLIDEF.PAS
X!
X1 CLIDEFPAS
X2 CONST
X!`125 CONST
X      CLI$_DEFAULTED = 261409 ;`123
X2 DEC_Routines
X!`125
X   `091ASYNCHRONOUS,EXTERNAL`093 FUNCTION cli$present (
X      name : `091CLASS_S`093 PACKED ARRAY `091l1..u1:integer`093 OF char )
X         : sts_type ; external ;
X
X   `091ASYNCHRONOUS,EXTERNAL`093 FUNCTION cli$get_value (
X      name : `091CLASS_S`093 PACKED ARRAY `091l1..u1 : integer`093 OF char ;
X      %DESCR retbuf : VARYING `091n2`093 OF char) : sts_type ; external ;`12
V3
X!
X! From SRC_VCLIB:OTSDEF.PAS (which does not yet exist)
X!
X1 OTSDEFPAS
X2 DEC_Routines
X!`125
X   `091ASYNCHRONOUS,EXTERNAL`093 FUNCTION ots$cvt_ti_l (
X      input_string : `091CLASS_S`093 PACKED ARRAY `091l1..u1:integer`093 OF
V char ;
X      VAR output_value : `091UNSAFE`093 integer ;
X      output_value_size : `091TRUNCATE`093 integer := 4 ;
X      flags_value : unsigned := 0) : sts_type ; external ;`123
X!
X! From SRC_VCLIB:STRDEF.PAS
X!
X1 STRDEFPAS
X2 DEC_Routines
X!`125
X   `091ASYNCHRONOUS,EXTERNAL`093 FUNCTION str$match_wild (
X      cand_str : `091CLASS_S`093 PACKED ARRAY `091l1..u1:integer`093 OF char
V ;
X      pattern_str : `091CLASS_S`093 PACKED ARRAY `091l2..u2:integer`093 OF c
Vhar)
X         : sts_type ; external ;`123
X!
X! From SRC_VCLIB:PASMSG.PAS
X!
X1 PASMSG
X!`125
XCONST
X   %INCLUDE 'SYS$LIBRARY:PASDEF.PAS'
X
XVAR
X   PAS$_FACILITY     : `091EXTERNAL,VALUE`093 sts_type ;`123
X!
X! From SRC_VCLIB:LIBITMLST.DEC
X!
X1 LIB_ITEM_LIST
X  FUNCTIONAL DESCRIPTION:
X     Builds an item list in its own static storage, and returns the
X     address of the item list.  This routine is designed to be called
X     directly from the parameter list of system services such as $MOUNT
X     $GETDVI, $GETJPI, and $GETSYI (see PASCAL DECLARATION for an example).
X
X  CALLING SEQUENCE:    item_list_address.rr.r = (item.rr.r`091,...`093)
X
X  IMPLICIT INPUTS:     None.
X
X  IMPLICIT OUTPUTS:    None.
X
X  SIDE EFFECTS:        None.
X2 Parameters
X  item -- items for inclusion in the item list.  The best way to to generate
X          these is with LIB_IN_ITEM and LIB_OUT_ITEM.
X2 Completion_Status
X  none -- does not return any status values.
X2 PASCAL_Definition
X!`125
X   `091EXTERNAL`093 FUNCTION lib_item_list (item : `091UNSAFE,LIST`093 lib_i
Vtem_type) :
X      lib_item_list_type ; external ;`123
X3 Calling_Example
X`091INHERIT ('STARLET_PEN','VCLIB_PEN')`093 PROGRAM dvitest (output) ;
X   VAR
X      logvolnam, disk_label, device : VARYING `09120`093 OF char := '' ;
X      free_blocks, disk_size, disk_owner_pid : unsigned := 0 ;
X   BEGIN
X      lib_sigiferr ($GETDVI (,, 'DISK$0', lib_item_list (
X         lib_out_item (dvi$_maxblock,   %DESCR disk_size),
X         lib_out_item (dvi$_freeblocks, %DESCR free_blocks),
X         lib_out_item (dvi$_logvolnam,  %DESCR logvolnam),
X         lib_out_item (dvi$_volnam,     %DESCR disk_label),
X         lib_out_item (dvi$_devnam,     %DESCR device),
X         lib_out_item (dvi$_pid,        %DESCR disk_owner_pid)))) ;
X      writeln (logvolnam, ', ', device, ', ', disk_label, ', ',
X         ', free =', free_blocks:1, ',
X         used =', (disk_size - free_blocks):1) ;
X      END.
X1 LIB_OUT_ITEM
X  FUNCTIONAL DESCRIPTION:
X     Builds an item specifing data to be written, for inclusion in an
X     item_list.  This routine is designed to be called from within a
X     call to LIB_ITEM_LIST.
X
X  CALLING SEQUENCE:    item.rr.r = (
X                          item_code.rlu.v, data.wx.dx `091, data_length.wwu.
Vr`093)
X
X  IMPLICIT INPUTS:     None.
X
X  IMPLICIT OUTPUTS:    None.
X
X  SIDE EFFECTS:        None.
X2 Parameters
X  item_code   -- Symbolic code for the item of data required.
X  data        -- Variable into which the item is to be returned. If it
X                 is of type varying string, the length is returned as well.
X  data_length -- Variable in which the length of the data is to be return-
X                 ed.  This is not done if data was of type varying string.
X2 Completion_Status
X  none -- does not return any status values.
X2 PASCAL_Definition
X!`125
X   `091EXTERNAL`093 FUNCTION lib_out_item (
X      %IMMED item_code : lib_long_type ;
X      %DESCR data : `091UNSAFE`093 lib_long_type ;
X      VAR data_length : lib_word_type := %IMMED 0)
X         : lib_item_type ; external ;`123
X1 LIB_IN_ITEM
X  FUNCTIONAL DESCRIPTION:
X     Builds an item specifing data to be written, for inclusion in an
X     item_list.  This routine is designed to be called from within a
X     call to LIB_ITEM_LIST.
X
X  CALLING SEQUENCE:    item.rr.r = (item_code.rlu.v `091, data.rx.dx`093)
X
X  IMPLICIT INPUTS:     None.
X
X  IMPLICIT OUTPUTS:    None.
X
X  SIDE EFFECTS:        None.
X
X  RESTRICTIONS:        The maximum data length is 80.
X2 Parameters
X  item_code   -- Symbolic code for operation required..
X  data        -- Variable containing data to be read.
X2 Completion_Status
X  none -- does not return any status values.
X2 PASCAL_Definition
X!`125
X   `091EXTERNAL`093 FUNCTION lib_in_item (
X      %IMMED item_code : lib_long_type ;
X      %STDESCR data : `091UNSAFE,READONLY`093 PACKED ARRAY `091l1..u1:intege
Vr`093
X         OF char := %IMMED 0) : lib_extended_item_type ; external ;
X`123
X! From SRC_VCLIB:LIBIFERR.DEC
X!
X1 LIB_RETIFERR
X  FUNCTIONAL DESCRIPTION:
X    Return from a routine if condition is not success.
X    The condition is put in the return value of the routine (R0).
X
X  CALLING SEQUENCE:    ret_status.wlc.r = lib_retiferr (status.rlc.v)
X
X  IMPLICIT INPUTS:     None.
X
X  IMPLICIT OUTPUTS:    None.
X
X  SIDE EFFECTS:        None.
X2 Parameters
X  status =  longword condition code
X2 Completion_Status
X  ret_status  =  status (i.e. the parameter)
X2 PASCAL_Definition
X!`125
X   `091EXTERNAL`093 FUNCTION lib_retiferr (
X      %IMMED status : sts_type) : sts_type ; external ;`123
X1 LIB_SIGIFERR
X  FUNCTIONAL DESCRIPTION:
X    Signal a condition if it is not success, optionally prefixing it with
X    other messages (with the normal passing of FAO arguments).
X
X  CALLING SEQUENCE:    ret_status.wlc.r = lib_sigiferr (
X                           status.rlc.v `091, signal_arg, ... `093)
X
X  IMPLICIT INPUTS:     None.
X
X  IMPLICIT OUTPUTS:    None.
X
X  SIDE EFFECTS:        None.
X2 Parameters
X  status      =  longword condition code
X  signal_arg  =  a list of condition codes (and FA0 arguments) to be signall
Ved
X                 ahead of the status.
X2 Completion_Status
X  ret_status  = status (i.e. the parameter)
X2 PASCAL_Definition
X!`125
X   `091EXTERNAL`093 FUNCTION lib_sigiferr (
X      %IMMED status : sts_type ;
X      %IMMED signal_arg : `091LIST,UNSAFE`093 sts_type) : sts_type ; externa
Vl ;
X`123
X! From SRC_VCLIB:LIBPARSE.DEC
X!
X1 LIB_PARSE
XFUNCTIONAL DESCRIPTION
X   Return an expanded file spec (or portions of it) (a run-time
X   version of F$PARSE).
X
XCALLING SEQUENCE:`009ret_status.wlc.v = lib_parse (
X                           file_spec.rt.dx, expanded_spec.wt.dx
X                           `091, default_spec.rt.dx`093 `091, related_spec.r
Vt.dx`093
X                           `091, expanded_length.ww.r,`093 `091, field.rl.r,
V ... `093)
X
XIMPLICIT INPUTS:`009Process default device and directory.
X
XIMPLICIT OUTPUTS:`009None.
X
XSIDE EFFECTS:`009`009None
X
XRESTRICTIONS:`009`009None
X
X2 Parameters
Xexpanded_spec  = The expanded file_spec.
Xexpanded_length= length of expanded file_spec
Xfile_spec      = The file_spec to parse
Xdefault_spec   = See RMS manual.
Xrelated_spec   = See RMS manual.
Xfield,..       = the fields to select. Select from the symbols NAM__NODE
X                 NAM__DEV, NAM__DIR, NAM__NAME, NAM__TYPE, NAM__VER.
X                 If no fields are specified, the entire expanded file_spec
X                 is returned.  Otherwise the requested fields are appended
X                 in order in expanded_spec.
X2 Completion_Status
XAny status returned by RMS or LIB$SCOPY_R_DX
X2 PASCAL_DEFINITION
X!`125
X   `091EXTERNAL`093 FUNCTION lib_parse (
X      file_spec : `091CLASS_S`093 PACKED ARRAY `091l1..u1:integer`093 OF cha
Vr ;
X      %DESCR expanded_spec : VARYING `091n1`093 OF char ;
X      default_spec : `091CLASS_S`093 PACKED ARRAY `091l2..u2:integer`093 OF
V char
X         := %IMMED 0 ;
X      related_spec : `091CLASS_S`093 PACKED ARRAY `091l3..u3:integer`093 OF
V char
X         := %IMMED 0 ;
X      VAR expanded_length : lib_word_type := %IMMED 0 ;
X      field : `091LIST`093 sts_type := %IMMED 0) : sts_type ; external ;`123
X!
X! From SRC_VCLIB:NAMDEF.PAS
X!
X1 NAMDEFPAS
X  Declarations necessary for the use of the routine lib_parse.
X2 CONST
X!`125 CONST
X      nam__node = 0 ;
X      nam__dev  = 1 ;
X      nam__dir  = 2 ;
X      nam__name = 3 ;
X      nam__type = 4 ;
X      nam__ver  = 5 ;`123
X!
X! From SRC_VCLIB:PASLIBDEF.PAS
X!
X1 PASLIBDEF
X`124************************************************************************
V****`124
X`124 Non-modular utility routines for use in PASCAL
V                             `124
X`124
V                                                                        `032
V   `124
X`124 AUTHOR:       Doug Miller
V                                                  `124
X`124 CREATED:      26-Sep-1984
V                                                  `124
X`124 MODIFIED:     Tim Cook, added addtim, subtim, difftim and bintim
V           `124
X`124                  12-Sep-1985
V                                               `124
X`124************************************************************************
V****`124
X2 CLI_PRESENT
X!`125 `091GLOBAL,ASYNCHRONOUS`093 FUNCTION success (`123
X!`125    status : `091UNSAFE`093 STS$TYPE) : boolean ; forward ;`123
X!`125
X   `091GLOBAL,ASYNCHRONOUS`093 FUNCTION cli_present (
X      keyword : PACKED ARRAY `091l1..u1:integer`093 OF char) : boolean ;
X      BEGIN
X         cli_present := success (CLI$PRESENT (keyword)) END ;`123
X2 FAILURE
X   A simple routine to test the STS$V_SUCCESS bit of a STS$TYPE status.
X      (used to control program flow)
X
X!`125
X   `091GLOBAL,ASYNCHRONOUS`093 FUNCTION failure (
X      status : `091UNSAFE`093 STS$TYPE) : boolean ;
X      BEGIN
X         failure := NOT status.STS$V_SUCCESS END ;`123
X2 PAS$FAB
X!`125
X   `091EXTERNAL,ASYNCHRONOUS`093 FUNCTION pas$fab (VAR f : `091UNSAFE`093 te
Vxt) :
X      fab_pointer ; external ;`123
X2 PAS$RAB
X!`125
X   `091EXTERNAL,ASYNCHRONOUS`093 FUNCTION pas$rab (VAR f : `091UNSAFE`093 te
Vxt) :
X      rab_pointer ; external ;`123
X2 SUCCESS
X   A simple routine to test the STS$V_SUCCESS bit of a STS$TYPE status.
X      (used to control program flow)
X
X   `091GLOBAL,ASYNCHRONOUS`093`125 FUNCTION success `123(
X      status : `091UNSAFE`093 STS$TYPE) : boolean `125 ;
X      BEGIN
X         success := status.STS$V_SUCCESS END ;`123
X!
X!`125 END. `123 of MODULE vclib `125
$ CALL UNPACK VCDEFS.PAS;1 812782375
$ v=f$verify(v)
$ EXIT

