?? RIGHT := 110 ??
?? NEWTITLE := 'PACKAGE_SOFTWARE Utility: DISPLAY_PACKING_LIST Subcommand.' ??
MODULE ram$display_packing_list_pacs;

{ PURPOSE:
{   This module contains the command interface for the PACKAGE_SOFTWARE
{   subcommand DISPLAY_PACKING_LIST.
{
{ DESIGN:
{   The code which displays the packing list resides in the module
{   RAM$DISPLAY_PACKING_LIST.
{   The compiled module resides in RAF$LIBRARY.
{
{ NOTES:
{

?? NEWTITLE := 'Global Declarations Referenced by This Module', EJECT ??
?? PUSH (LISTEXT := ON) ??
*copyc ost$status
?? POP ??
*copyc clp$evaluate_parameters
*copyc rap$display_packing_list
?? OLDTITLE, NEWTITLE := 'Global Declarations Declared by This Module', EJECT ??
?? OLDTITLE, NEWTITLE := '[XDCL] rap$display_packing_list_pacs', EJECT ??

{ PURPOSE:
{   This procedure displays information about a packing list file.
{
{ DESIGN:
{   Combine the packing list name from the command parameters with
{   the current location of the installation database catalog to build
{   a path to the packing list file.  Invoke the interface to display
{   the contents of a packing list.
{ NOTES:

  PROCEDURE [XDCL] rap$display_packing_list_pacs
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{ PROCEDURE displ_pdt (
{   packing_list, pl: file = $required
{   display_option, do: key
{       (brief, b), (full, f)
{     keyend = brief
{   output, o: file = $output
{   status)

?? PUSH (LISTEXT := ON) ??

    VAR
      pdt: [STATIC, READ, cls$declaration_section] record
        header: clt$pdt_header,
        names: array [1 .. 7] of clt$pdt_parameter_name,
        parameters: array [1 .. 4] of clt$pdt_parameter,
        type1: record
          header: clt$type_specification_header,
        recend,
        type2: record
          header: clt$type_specification_header,
          qualifier: clt$keyword_type_qualifier,
          keyword_specs: array [1 .. 4] of clt$keyword_specification,
          default_value: string (5),
        recend,
        type3: record
          header: clt$type_specification_header,
          default_value: string (7),
        recend,
        type4: record
          header: clt$type_specification_header,
        recend,
      recend := [[1, [88, 9, 14, 15, 0, 37, 484], clc$command, 7, 4, 1, 0, 0, 0, 4, 'DISPL_PDT'],
            [['DISPLAY_OPTION                 ', clc$nominal_entry, 2],
            ['DO                             ', clc$abbreviation_entry, 2],
            ['O                              ', clc$abbreviation_entry, 3],
            ['OUTPUT                         ', clc$nominal_entry, 3],
            ['PACKING_LIST                   ', clc$nominal_entry, 1],
            ['PL                             ', clc$abbreviation_entry, 1],
            ['STATUS                         ', clc$nominal_entry, 4]], [
{ PARAMETER 1
      [5, clc$normal_usage_entry, clc$non_secure_parameter, $clt$parameter_spec_methods
            [clc$specify_by_name, clc$specify_positionally], clc$pass_by_value, clc$immediate_evaluation,
            clc$standard_parameter_checking, 3, clc$required_parameter, 0, 0],
{ PARAMETER 2
      [1, clc$normal_usage_entry, clc$non_secure_parameter, $clt$parameter_spec_methods
            [clc$specify_by_name, clc$specify_positionally], clc$pass_by_value, clc$immediate_evaluation,
            clc$standard_parameter_checking, 155, clc$optional_default_parameter, 0, 5],
{ PARAMETER 3
      [4, clc$normal_usage_entry, clc$non_secure_parameter, $clt$parameter_spec_methods
            [clc$specify_by_name, clc$specify_positionally], clc$pass_by_value, clc$immediate_evaluation,
            clc$standard_parameter_checking, 3, clc$optional_default_parameter, 0, 7],
{ PARAMETER 4
      [7, clc$normal_usage_entry, clc$non_secure_parameter, $clt$parameter_spec_methods [clc$specify_by_name],
            clc$pass_by_reference, clc$immediate_evaluation, clc$standard_parameter_checking, 3,
            clc$optional_parameter, 0, 0]],
{ PARAMETER 1
      [[1, 0, clc$file_type]],
{ PARAMETER 2
      [[1, 0, clc$keyword_type], [4], [['B                              ', clc$abbreviation_entry,
            clc$normal_usage_entry, 1], ['BRIEF                          ', clc$nominal_entry,
            clc$normal_usage_entry, 1], ['F                              ', clc$abbreviation_entry,
            clc$normal_usage_entry, 2], ['FULL                           ', clc$nominal_entry,
            clc$normal_usage_entry, 2]], 'brief'],
{ PARAMETER 3
      [[1, 0, clc$file_type], '$output'],
{ PARAMETER 4
      [[1, 0, clc$status_type]]];

?? POP ??

    CONST
      p$packing_list = 1,
      p$display_option = 2,
      p$output = 3,
      p$status = 4;

    VAR
      pvt: array [1 .. 4] of clt$parameter_value;

    status.normal := TRUE;

    clp$evaluate_parameters (parameter_list, #SEQ (pdt), NIL, ^pvt, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    rap$display_packing_list (pvt [p$packing_list].value^.file_value,
          pvt[p$packing_list].value^.file_value {subtitle},
          NIL {No IDB catalog path to display},
          pvt [p$display_option].value^.name_value, pvt [p$output].value^.file_value,
          status);

  PROCEND rap$display_packing_list_pacs;
?? OLDTITLE ??

MODEND ram$display_packing_list_pacs;
