?? RIGHT := 110 ??
?? NEWTITLE := 'NOS/VE:  Object Library Generator' ??
MODULE ocm$change;



{ PURPOSE:
{   To alter various characteristics of
{   a module in the output library.

?? NEWTITLE := 'Global Declarations Referenced by This Module', EJECT ??
?? PUSH (LISTEXT := ON) ??
*copyc occ$retain
*copyc oce$library_generator_errors
*copyc oct$display_toggles
*copyc oct$header
*copyc oct$nlm_modification_list
*copyc ost$status
?? POP ??
*copyc avp$get_capability
*copyc clp$count_list_elements
*copyc clp$evaluate_parameters
*copyc ocp$add_an_nlm_to_tree
*copyc ocp$close_all_open_files
*copyc ocp$extract_nlm_from_tree
*copyc ocp$generate_message
*copyc ocp$initialize_olg_working_heap
*copyc ocp$obtain_header
*copyc ocp$obtain_library_list
*copyc ocp$obtain_xdcl_list
*copyc ocp$search_modification_list
*copyc ocp$search_nlm_tree
*copyc ocp$search_xdcl_list
*copyc osp$append_status_parameter
*copyc osp$set_status_abnormal
*copyc osp$set_status_condition
*copyc pmp$continue_to_cause
*copyc pmp$disestablish_cond_handler
*copyc pmp$establish_condition_handler

*copyc ocv$nlm_list
*copyc ocv$olg_scratch_seq
*copyc ocv$olg_working_heap
*copyc ocv$open_file_list
?? OLDTITLE ??
?? NEWTITLE := 'Global Declarations Declared by This Module', EJECT ??

  VAR
    command_status: ost$status;

?? OLDTITLE ??
?? NEWTITLE := '[XDCL] ocp$_change_module_attribute' ??
?? EJECT ??

  PROCEDURE [XDCL] ocp$_change_module_attribute
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);


{ PROCEDURE (ocm$creol_chama) change_module_attributes, chama (
{   module, modules, m: any of
{       key
{         all
{       keyend
{       list of program_name
{       list of range of program_name
{     anyend = $required
{   new_name, nn: program_name = $optional
{   substitute, substitutes, s: (BY_NAME) list of record
{       old_name: program_name
{       new_name: program_name
{     recend = $optional
{   omit, o: (BY_NAME) list of program_name = $optional
{   gate, gates, g: (BY_NAME) any of
{       key
{         all
{       keyend
{       list of program_name
{     anyend = $optional
{   not_gate, not_gates, ng: (BY_NAME) any of
{       key
{         all
{       keyend
{       list of program_name
{     anyend = $optional
{   starting_procedure, sp: (BY_NAME) program_name = $optional
{   omit_library, omit_libraries, ol: (BY_NAME) list of name = $optional
{   add_library, add_libraries, al: (BY_NAME) list of name = $optional
{   retain, r: (BY_NAME) any of
{       key
{         all
{       keyend
{       list of program_name
{     anyend = $optional
{   not_retain, nr: (BY_NAME) any of
{       key
{         all
{       keyend
{       list of program_name
{     anyend = $optional
{   omit_non_retained_entry_points, onrep: (BY_NAME) boolean = $optional
{   omit_debug_tables, omit_debug_table, odt: (BY_NAME) any of
{       key
{         all
{       keyend
{       list of key
{         (line_table, lt)
{         (parameter_checking, pc)
{         (supplemental_debug_table, sdt)
{         (symbol_table, st)
{       keyend
{     anyend = $optional
{   comment, c: (BY_NAME) string 1..40 = $optional
{   application_identifier, ai: (BY_NAME, ADVANCED) any of
{       key
{         $unspecified
{       keyend
{       name
{     anyend = $optional
{   cybil_parameter_checking, cpc: (BY_NAME) key
{       (source, s)
{       (object, o)
{     keyend = $optional
{   status)

?? PUSH (LISTEXT := ON) ??
?? FMT (FORMAT := OFF) ??

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 40] of clt$pdt_parameter_name,
      parameters: array [1 .. 17] of clt$pdt_parameter,
      type1: record
        header: clt$type_specification_header,
        qualifier: clt$union_type_qualifier,
        type_size_1: clt$type_specification_size,
        element_type_spec_1: record
          header: clt$type_specification_header,
          qualifier: clt$keyword_type_qualifier,
          keyword_specs: array [1 .. 1] of clt$keyword_specification,
        recend,
        type_size_2: clt$type_specification_size,
        element_type_spec_2: record
          header: clt$type_specification_header,
          qualifier: clt$list_type_qualifier,
          element_type_spec: record
            header: clt$type_specification_header,
          recend,
        recend,
        type_size_3: clt$type_specification_size,
        element_type_spec_3: record
          header: clt$type_specification_header,
          qualifier: clt$list_type_qualifier,
          element_type_spec: record
            header: clt$type_specification_header,
            qualifier: clt$range_type_qualifier,
            element_type_spec: record
              header: clt$type_specification_header,
            recend,
          recend,
        recend,
      recend,
      type2: record
        header: clt$type_specification_header,
      recend,
      type3: record
        header: clt$type_specification_header,
        qualifier: clt$list_type_qualifier,
        element_type_spec: record
          header: clt$type_specification_header,
          qualifier: clt$record_type_qualifier,
          field_spec_1: clt$field_specification,
          element_type_spec_1: record
            header: clt$type_specification_header,
          recend,
          field_spec_2: clt$field_specification,
          element_type_spec_2: record
            header: clt$type_specification_header,
          recend,
        recend,
      recend,
      type4: record
        header: clt$type_specification_header,
        qualifier: clt$list_type_qualifier,
        element_type_spec: record
          header: clt$type_specification_header,
        recend,
      recend,
      type5: record
        header: clt$type_specification_header,
        qualifier: clt$union_type_qualifier,
        type_size_1: clt$type_specification_size,
        element_type_spec_1: record
          header: clt$type_specification_header,
          qualifier: clt$keyword_type_qualifier,
          keyword_specs: array [1 .. 1] of clt$keyword_specification,
        recend,
        type_size_2: clt$type_specification_size,
        element_type_spec_2: record
          header: clt$type_specification_header,
          qualifier: clt$list_type_qualifier,
          element_type_spec: record
            header: clt$type_specification_header,
          recend,
        recend,
      recend,
      type6: record
        header: clt$type_specification_header,
        qualifier: clt$union_type_qualifier,
        type_size_1: clt$type_specification_size,
        element_type_spec_1: record
          header: clt$type_specification_header,
          qualifier: clt$keyword_type_qualifier,
          keyword_specs: array [1 .. 1] of clt$keyword_specification,
        recend,
        type_size_2: clt$type_specification_size,
        element_type_spec_2: record
          header: clt$type_specification_header,
          qualifier: clt$list_type_qualifier,
          element_type_spec: record
            header: clt$type_specification_header,
          recend,
        recend,
      recend,
      type7: record
        header: clt$type_specification_header,
      recend,
      type8: record
        header: clt$type_specification_header,
        qualifier: clt$list_type_qualifier,
        element_type_spec: record
          header: clt$type_specification_header,
          qualifier: clt$name_type_qualifier,
        recend,
      recend,
      type9: record
        header: clt$type_specification_header,
        qualifier: clt$list_type_qualifier,
        element_type_spec: record
          header: clt$type_specification_header,
          qualifier: clt$name_type_qualifier,
        recend,
      recend,
      type10: record
        header: clt$type_specification_header,
        qualifier: clt$union_type_qualifier,
        type_size_1: clt$type_specification_size,
        element_type_spec_1: record
          header: clt$type_specification_header,
          qualifier: clt$keyword_type_qualifier,
          keyword_specs: array [1 .. 1] of clt$keyword_specification,
        recend,
        type_size_2: clt$type_specification_size,
        element_type_spec_2: record
          header: clt$type_specification_header,
          qualifier: clt$list_type_qualifier,
          element_type_spec: record
            header: clt$type_specification_header,
          recend,
        recend,
      recend,
      type11: record
        header: clt$type_specification_header,
        qualifier: clt$union_type_qualifier,
        type_size_1: clt$type_specification_size,
        element_type_spec_1: record
          header: clt$type_specification_header,
          qualifier: clt$keyword_type_qualifier,
          keyword_specs: array [1 .. 1] of clt$keyword_specification,
        recend,
        type_size_2: clt$type_specification_size,
        element_type_spec_2: record
          header: clt$type_specification_header,
          qualifier: clt$list_type_qualifier,
          element_type_spec: record
            header: clt$type_specification_header,
          recend,
        recend,
      recend,
      type12: record
        header: clt$type_specification_header,
      recend,
      type13: record
        header: clt$type_specification_header,
        qualifier: clt$union_type_qualifier,
        type_size_1: clt$type_specification_size,
        element_type_spec_1: record
          header: clt$type_specification_header,
          qualifier: clt$keyword_type_qualifier,
          keyword_specs: array [1 .. 1] of clt$keyword_specification,
        recend,
        type_size_2: clt$type_specification_size,
        element_type_spec_2: record
          header: clt$type_specification_header,
          qualifier: clt$list_type_qualifier,
          element_type_spec: record
            header: clt$type_specification_header,
            qualifier: clt$keyword_type_qualifier,
            keyword_specs: array [1 .. 8] of clt$keyword_specification,
          recend,
        recend,
      recend,
      type14: record
        header: clt$type_specification_header,
        qualifier: clt$string_type_qualifier,
      recend,
      type15: record
        header: clt$type_specification_header,
        qualifier: clt$union_type_qualifier,
        type_size_1: clt$type_specification_size,
        element_type_spec_1: record
          header: clt$type_specification_header,
          qualifier: clt$keyword_type_qualifier,
          keyword_specs: array [1 .. 1] of clt$keyword_specification,
        recend,
        type_size_2: clt$type_specification_size,
        element_type_spec_2: record
          header: clt$type_specification_header,
          qualifier: clt$name_type_qualifier,
        recend,
      recend,
      type16: record
        header: clt$type_specification_header,
        qualifier: clt$keyword_type_qualifier,
        keyword_specs: array [1 .. 4] of clt$keyword_specification,
      recend,
      type17: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [89, 8, 10, 14, 41, 44, 322],
    clc$command, 40, 17, 1, 1, 0, 0, 17, 'OCM$CREOL_CHAMA'], [
    ['ADD_LIBRARIES                  ',clc$alias_entry, 9],
    ['ADD_LIBRARY                    ',clc$nominal_entry, 9],
    ['AI                             ',clc$abbreviation_entry, 15],
    ['AL                             ',clc$abbreviation_entry, 9],
    ['APPLICATION_IDENTIFIER         ',clc$nominal_entry, 15],
    ['C                              ',clc$abbreviation_entry, 14],
    ['COMMENT                        ',clc$nominal_entry, 14],
    ['CPC                            ',clc$abbreviation_entry, 16],
    ['CYBIL_PARAMETER_CHECKING       ',clc$nominal_entry, 16],
    ['G                              ',clc$abbreviation_entry, 5],
    ['GATE                           ',clc$nominal_entry, 5],
    ['GATES                          ',clc$alias_entry, 5],
    ['M                              ',clc$abbreviation_entry, 1],
    ['MODULE                         ',clc$nominal_entry, 1],
    ['MODULES                        ',clc$alias_entry, 1],
    ['NEW_NAME                       ',clc$nominal_entry, 2],
    ['NG                             ',clc$abbreviation_entry, 6],
    ['NN                             ',clc$abbreviation_entry, 2],
    ['NOT_GATE                       ',clc$nominal_entry, 6],
    ['NOT_GATES                      ',clc$alias_entry, 6],
    ['NOT_RETAIN                     ',clc$nominal_entry, 11],
    ['NR                             ',clc$abbreviation_entry, 11],
    ['O                              ',clc$abbreviation_entry, 4],
    ['ODT                            ',clc$abbreviation_entry, 13],
    ['OL                             ',clc$abbreviation_entry, 8],
    ['OMIT                           ',clc$nominal_entry, 4],
    ['OMIT_DEBUG_TABLE               ',clc$alias_entry, 13],
    ['OMIT_DEBUG_TABLES              ',clc$nominal_entry, 13],
    ['OMIT_LIBRARIES                 ',clc$alias_entry, 8],
    ['OMIT_LIBRARY                   ',clc$nominal_entry, 8],
    ['OMIT_NON_RETAINED_ENTRY_POINTS ',clc$nominal_entry, 12],
    ['ONREP                          ',clc$abbreviation_entry, 12],
    ['R                              ',clc$abbreviation_entry, 10],
    ['RETAIN                         ',clc$nominal_entry, 10],
    ['S                              ',clc$abbreviation_entry, 3],
    ['SP                             ',clc$abbreviation_entry, 7],
    ['STARTING_PROCEDURE             ',clc$nominal_entry, 7],
    ['STATUS                         ',clc$nominal_entry, 17],
    ['SUBSTITUTE                     ',clc$nominal_entry, 3],
    ['SUBSTITUTES                    ',clc$alias_entry, 3]],
    [
{ PARAMETER 1
    [14, 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, 113, clc$required_parameter, 0, 0],
{ PARAMETER 2
    [16, 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_parameter, 0, 0],
{ PARAMETER 3
    [39, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_value, clc$immediate_evaluation,
  clc$standard_parameter_checking, 101, clc$optional_parameter, 0, 0],
{ PARAMETER 4
    [26, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_value, clc$immediate_evaluation,
  clc$standard_parameter_checking, 19, clc$optional_parameter, 0, 0],
{ PARAMETER 5
    [11, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_value, clc$immediate_evaluation,
  clc$standard_parameter_checking, 83, clc$optional_parameter, 0, 0],
{ PARAMETER 6
    [19, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_value, clc$immediate_evaluation,
  clc$standard_parameter_checking, 83, clc$optional_parameter, 0, 0],
{ PARAMETER 7
    [37, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_value, clc$immediate_evaluation,
  clc$standard_parameter_checking, 3, clc$optional_parameter, 0, 0],
{ PARAMETER 8
    [30, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_value, clc$immediate_evaluation,
  clc$standard_parameter_checking, 21, clc$optional_parameter, 0, 0],
{ PARAMETER 9
    [2, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_value, clc$immediate_evaluation,
  clc$standard_parameter_checking, 21, clc$optional_parameter, 0, 0],
{ PARAMETER 10
    [34, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_value, clc$immediate_evaluation,
  clc$standard_parameter_checking, 83, clc$optional_parameter, 0, 0],
{ PARAMETER 11
    [21, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_value, clc$immediate_evaluation,
  clc$standard_parameter_checking, 83, clc$optional_parameter, 0, 0],
{ PARAMETER 12
    [31, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_value, clc$immediate_evaluation,
  clc$standard_parameter_checking, 3, clc$optional_parameter, 0, 0],
{ PARAMETER 13
    [28, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_value, clc$immediate_evaluation,
  clc$standard_parameter_checking, 383, clc$optional_parameter, 0, 0],
{ PARAMETER 14
    [7, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_value, clc$immediate_evaluation,
  clc$standard_parameter_checking, 8, clc$optional_parameter, 0, 0],
{ PARAMETER 15
    [5, clc$advanced_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_value, clc$immediate_evaluation,
  clc$standard_parameter_checking, 69, clc$optional_parameter, 0, 0],
{ PARAMETER 16
    [9, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_value, clc$immediate_evaluation,
  clc$standard_parameter_checking, 155, clc$optional_parameter, 0, 0],
{ PARAMETER 17
    [38, 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$union_type], [[clc$keyword_type,
    clc$list_type],
    FALSE, 3],
    44, [[1, 0, clc$keyword_type], [1], [
      ['ALL                            ', clc$nominal_entry,
  clc$normal_usage_entry, 1]]
      ],
    19, [[1, 0, clc$list_type], [3, 1, clc$max_list_size, FALSE],
        [[1, 0, clc$program_name_type]]
      ],
    26, [[1, 0, clc$list_type], [10, 1, clc$max_list_size, FALSE],
        [[1, 0, clc$range_type], [3],
          [[1, 0, clc$program_name_type]]
        ]
      ]
    ],
{ PARAMETER 2
    [[1, 0, clc$program_name_type]],
{ PARAMETER 3
    [[1, 0, clc$list_type], [85, 1, clc$max_list_size, FALSE],
      [[1, 0, clc$record_type], [2],
      ['OLD_NAME                       ', clc$required_field, 3], [[1, 0,
  clc$program_name_type]],
      ['NEW_NAME                       ', clc$required_field, 3], [[1, 0,
  clc$program_name_type]]
      ]
    ],
{ PARAMETER 4
    [[1, 0, clc$list_type], [3, 1, clc$max_list_size, FALSE],
      [[1, 0, clc$program_name_type]]
    ],
{ PARAMETER 5
    [[1, 0, clc$union_type], [[clc$keyword_type,
    clc$list_type],
    FALSE, 2],
    44, [[1, 0, clc$keyword_type], [1], [
      ['ALL                            ', clc$nominal_entry,
  clc$normal_usage_entry, 1]]
      ],
    19, [[1, 0, clc$list_type], [3, 1, clc$max_list_size, FALSE],
        [[1, 0, clc$program_name_type]]
      ]
    ],
{ PARAMETER 6
    [[1, 0, clc$union_type], [[clc$keyword_type,
    clc$list_type],
    FALSE, 2],
    44, [[1, 0, clc$keyword_type], [1], [
      ['ALL                            ', clc$nominal_entry,
  clc$normal_usage_entry, 1]]
      ],
    19, [[1, 0, clc$list_type], [3, 1, clc$max_list_size, FALSE],
        [[1, 0, clc$program_name_type]]
      ]
    ],
{ PARAMETER 7
    [[1, 0, clc$program_name_type]],
{ PARAMETER 8
    [[1, 0, clc$list_type], [5, 1, clc$max_list_size, FALSE],
      [[1, 0, clc$name_type], [1, osc$max_name_size]]
    ],
{ PARAMETER 9
    [[1, 0, clc$list_type], [5, 1, clc$max_list_size, FALSE],
      [[1, 0, clc$name_type], [1, osc$max_name_size]]
    ],
{ PARAMETER 10
    [[1, 0, clc$union_type], [[clc$keyword_type,
    clc$list_type],
    FALSE, 2],
    44, [[1, 0, clc$keyword_type], [1], [
      ['ALL                            ', clc$nominal_entry,
  clc$normal_usage_entry, 1]]
      ],
    19, [[1, 0, clc$list_type], [3, 1, clc$max_list_size, FALSE],
        [[1, 0, clc$program_name_type]]
      ]
    ],
{ PARAMETER 11
    [[1, 0, clc$union_type], [[clc$keyword_type,
    clc$list_type],
    FALSE, 2],
    44, [[1, 0, clc$keyword_type], [1], [
      ['ALL                            ', clc$nominal_entry,
  clc$normal_usage_entry, 1]]
      ],
    19, [[1, 0, clc$list_type], [3, 1, clc$max_list_size, FALSE],
        [[1, 0, clc$program_name_type]]
      ]
    ],
{ PARAMETER 12
    [[1, 0, clc$boolean_type]],
{ PARAMETER 13
    [[1, 0, clc$union_type], [[clc$keyword_type,
    clc$list_type],
    FALSE, 2],
    44, [[1, 0, clc$keyword_type], [1], [
      ['ALL                            ', clc$nominal_entry,
  clc$normal_usage_entry, 1]]
      ],
    319, [[1, 0, clc$list_type], [303, 1, clc$max_list_size, FALSE],
        [[1, 0, clc$keyword_type], [8], [
        ['LINE_TABLE                     ', clc$nominal_entry,
  clc$normal_usage_entry, 1],
        ['LT                             ', clc$abbreviation_entry,
  clc$normal_usage_entry, 1],
        ['PARAMETER_CHECKING             ', clc$nominal_entry,
  clc$normal_usage_entry, 2],
        ['PC                             ', clc$abbreviation_entry,
  clc$normal_usage_entry, 2],
        ['SDT                            ', clc$abbreviation_entry,
  clc$normal_usage_entry, 3],
        ['ST                             ', clc$abbreviation_entry,
  clc$normal_usage_entry, 4],
        ['SUPPLEMENTAL_DEBUG_TABLE       ', clc$nominal_entry,
  clc$normal_usage_entry, 3],
        ['SYMBOL_TABLE                   ', clc$nominal_entry,
  clc$normal_usage_entry, 4]]
        ]
      ]
    ],
{ PARAMETER 14
    [[1, 0, clc$string_type], [1, 40, FALSE]],
{ PARAMETER 15
    [[1, 0, clc$union_type], [[clc$keyword_type,
    clc$name_type],
    FALSE, 2],
    44, [[1, 0, clc$keyword_type], [1], [
      ['$UNSPECIFIED                   ', clc$nominal_entry,
  clc$normal_usage_entry, 1]]
      ],
    5, [[1, 0, clc$name_type], [1, osc$max_name_size]]
    ],
{ PARAMETER 16
    [[1, 0, clc$keyword_type], [4], [
    ['O                              ', clc$abbreviation_entry,
  clc$normal_usage_entry, 2],
    ['OBJECT                         ', clc$nominal_entry,
  clc$normal_usage_entry, 2],
    ['S                              ', clc$abbreviation_entry,
  clc$normal_usage_entry, 1],
    ['SOURCE                         ', clc$nominal_entry,
  clc$normal_usage_entry, 1]]
    ],
{ PARAMETER 17
    [[1, 0, clc$status_type]]];

?? FMT (FORMAT := ON) ??
?? POP ??

    CONST
      p$module = 1,
      p$new_name = 2,
      p$substitute = 3,
      p$omit = 4,
      p$gate = 5,
      p$not_gate = 6,
      p$starting_procedure = 7,
      p$omit_library = 8,
      p$add_library = 9,
      p$retain = 10,
      p$not_retain = 11,
      p$omit_non_retained_entry_point = 12 {OMIT_NON_RETAINED_ENTRY_POINTS} ,
      p$omit_debug_tables = 13,
      p$comment = 14,
      p$application_identifier = 15,
      p$cybil_parameter_checking = 16,
      p$status = 17;

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

    TYPE
      oct$attribute_change = (add_attribute, remove_attribute);

    TYPE
      oct$names = array [1 .. * ] of pmt$program_name;

    VAR
      object_type_checking: [STATIC, READ] string (6) := 'OBJECT';

    VAR
      application_administrator: boolean;

    VAR
      established_conditions: pmt$condition,
      established_descriptor: pmt$established_handler;

?? NEWTITLE := 'condition_handler', EJECT ??

{ PURPOSE:
{   The purpose of this procedure is to handle the terminate break and
{   block exit conditions.

    PROCEDURE condition_handler
      (    condition: pmt$condition;
           condition_descriptor: ^pmt$condition_information;
           stack_frame_save_area_p: ^ost$stack_frame_save_area;
       VAR handler_status: ost$status);

      IF (condition.selector = ifc$interactive_condition) AND
            (condition.interactive_condition = ifc$terminate_break) THEN

{ Ignore the condition.

        RETURN;
      ELSEIF condition.selector = pmc$block_exit_processing THEN
        ocp$close_all_open_files (ocv$open_file_list);
        ocp$initialize_olg_working_heap;
        RESET ocv$olg_scratch_seq;
      ELSE
        pmp$continue_to_cause (pmc$execute_standard_procedure, handler_status);
      IFEND;
    PROCEND condition_handler;
?? OLDTITLE ??
?? NEWTITLE := 'add_modules_to_change_list', EJECT ??

    PROCEDURE add_modules_to_change_list
      (    first_module: pmt$program_name;
           last_module: pmt$program_name;
           change_list: {output} ^oct$nlm_modification_list;
       VAR status: ost$status);


      VAR
        new_changes: ^oct$nlm_modification_list,
        last_change: ^oct$nlm_modification_list,

        module_found: boolean,
        nlm: ^oct$new_library_module_list,
        current_module: pmt$program_name;


      ocp$search_modification_list (osc$null_name, change_list, new_changes, module_found);


      ocp$search_nlm_tree (first_module, nlm, module_found);

      IF NOT module_found THEN
        IF first_module = last_module THEN
          osp$set_status_abnormal (oc, oce$w_module_not_on_library, first_module, status);
        ELSE
          osp$set_status_abnormal (oc, oce$w_subrange_not_found_on_lib, first_module, status);
          osp$append_status_parameter (osc$status_parameter_delimiter, first_module, status);
          osp$append_status_parameter (osc$status_parameter_delimiter, last_module, status);
        IFEND;

        ocp$generate_message (status);
        osp$set_status_abnormal (oc, oce$e_some_modules_not, 'changed', command_status);
        RETURN; { ---->
      IFEND;

?? EJECT ??

      REPEAT
        current_module := nlm^.name;
        IF current_module = osc$null_name THEN
          osp$set_status_abnormal (oc, oce$e_range_module_2_not_found, last_module, status);
          osp$append_status_parameter (osc$status_parameter_delimiter, first_module, status);
          ocp$generate_message (status);
          osp$set_status_abnormal (oc, oce$e_some_modules_not, 'changed', command_status);
          new_changes^.link := NIL;
          RETURN;
        IFEND;

        ocp$search_modification_list (current_module, change_list, last_change, module_found);
        IF module_found THEN
          osp$set_status_abnormal (oc, oce$w_same_module_quoted_twice, current_module, status);
          ocp$generate_message (status);
          osp$set_status_abnormal (oc, oce$e_some_modules_not, 'changed', command_status);

        ELSE
          NEXT last_change^.link IN ocv$olg_scratch_seq;
          last_change := last_change^.link;
          IF last_change = NIL THEN
            osp$set_status_abnormal (oc, oce$e_internal_olg_seg_overflow, '', status);
            RETURN;
          IFEND;

          IF nlm^.changed_info = NIL THEN
            ALLOCATE nlm^.changed_info IN ocv$olg_working_heap^;
            IF nlm^.changed_info = NIL THEN
              osp$set_status_abnormal (oc, oce$e_internal_olg_seg_overflow, '', status);
              RETURN;
            IFEND;

            nlm^.changed_info^.name := NIL;
            nlm^.changed_info^.commentary := NIL;
            nlm^.changed_info^.entry_points := NIL;
            nlm^.changed_info^.starting_procedure := osc$null_name;
            nlm^.changed_info^.new_libraries := FALSE;
            nlm^.changed_info^.library_list := NIL;
            nlm^.changed_info^.debug_tables_to_omit := $oct$debug_tables [];
            nlm^.changed_info^.application_identifier := NIL;
            nlm^.changed_info^.cybil_parameter_checking := '      ';
          IFEND;

          last_change^.nlm := nlm;
          last_change^.link := NIL;
        IFEND;

        nlm := nlm^.f_link;

      UNTIL current_module = last_module;


    PROCEND add_modules_to_change_list;
?? OLDTITLE ??
?? NEWTITLE := 'change_module_name', EJECT ??

    PROCEDURE change_module_name
      (    parameter: clt$parameter_value;
           change_list: ^oct$nlm_modification_list;
       VAR status: ost$status);


      VAR
        new_module_name: pmt$program_name,
        ignore: ^oct$new_library_module_list,
        module_found: boolean;

      status.normal := TRUE;
      IF multiple_modules THEN
        osp$set_status_condition (oce$e_cant_change_module_name, status);
        RETURN;
      IFEND;

      new_module_name := parameter.value^.program_name_value;
      ocp$search_nlm_tree (new_module_name, ignore, module_found);
      IF module_found THEN
        osp$set_status_abnormal (oc, oce$e_module_already_on_library, new_module_name, status);
        RETURN;
      IFEND;

      IF change_list^.nlm^.changed_info^.name = NIL THEN
        ALLOCATE change_list^.nlm^.changed_info^.name IN ocv$olg_working_heap^;
        IF change_list^.nlm^.changed_info^.name = NIL THEN
          osp$set_status_condition (oce$e_internal_olg_seg_overflow, status);
          RETURN;
        IFEND;
      IFEND;
      change_list^.nlm^.changed_info^.name^ := new_module_name;

      ocp$extract_nlm_from_tree (change_list^.nlm);
      change_list^.nlm^.name := new_module_name;
      ocp$add_an_nlm_to_tree (change_list^.nlm);


    PROCEND change_module_name;
?? OLDTITLE ??
?? NEWTITLE := 'build_xdcl_lists', EJECT ??

    PROCEDURE build_xdcl_lists
      (    change_list: ^oct$nlm_modification_list;
       VAR status: ost$status);


      VAR
        deferred_entry_point_list: oct$external_declaration_list,
        next_change: ^oct$nlm_modification_list,
        nlm: ^oct$new_library_module_list,
        xdcl_list: oct$external_declaration_list,
        starting_procedure: pmt$program_name;

      status.normal := TRUE;
      next_change := change_list;

      WHILE (next_change <> NIL) DO
        nlm := next_change^.nlm;

        ocp$obtain_xdcl_list (nlm^.changed_info, occ$retain, {obtain_deferred_entry_points} FALSE,
              nlm^.description^, xdcl_list, starting_procedure, deferred_entry_point_list, status);
        IF NOT status.normal THEN
          RETURN;
        IFEND;

        nlm^.changed_info^.entry_points := xdcl_list.link;
        nlm^.changed_info^.starting_procedure := starting_procedure;

        next_change := next_change^.link;
      WHILEND;


    PROCEND build_xdcl_lists;
?? OLDTITLE ??
?? NEWTITLE := 'build_library_lists', EJECT ??

    PROCEDURE build_library_lists
      (    change_list: ^oct$nlm_modification_list;
       VAR status: ost$status);


      VAR
        next_change: ^oct$nlm_modification_list,
        nlm: ^oct$new_library_module_list,
        library_list: oct$name_list;

      status.normal := TRUE;
      next_change := change_list;

      WHILE (next_change <> NIL) DO
        nlm := next_change^.nlm;

        ocp$obtain_library_list (nlm^.description^, nlm^.changed_info, library_list, occ$retain, status);
        IF NOT status.normal THEN
          RETURN;
        IFEND;

        nlm^.changed_info^.library_list := library_list.link;

        next_change := next_change^.link;
      WHILEND;


    PROCEND build_library_lists;
?? OLDTITLE ??
?? NEWTITLE := 'process_substitutions', EJECT ??

    PROCEDURE process_substitutions
      (    parameter: clt$parameter_value;
           change_list: ^oct$nlm_modification_list;
       VAR status: ost$status);


      VAR
        old_names: ^oct$names,
        new_names: ^oct$names,
        i: integer,
        next_change: ^oct$nlm_modification_list,
        node: ^clt$data_value,
        number_of_names: clt$list_size,
        found: boolean,
        xdcl_list: oct$external_declaration_list,
        xdcl_before: ^oct$external_declaration_list;

      status.normal := TRUE;
      number_of_names := clp$count_list_elements (parameter.value);
      NEXT old_names: [1 .. number_of_names] IN ocv$olg_scratch_seq;
      IF (old_names = NIL) THEN
        osp$set_status_condition (oce$e_internal_olg_seg_overflow, status);
        RETURN;
      IFEND;
      NEXT new_names: [1 .. number_of_names] IN ocv$olg_scratch_seq;
      IF (new_names = NIL) THEN
        osp$set_status_condition (oce$e_internal_olg_seg_overflow, status);
        RETURN;
      IFEND;
      node := parameter.value;
      FOR i := 1 TO number_of_names DO
        old_names^ [i] := node^.element_value^.field_values^ [1].value^.program_name_value;
        new_names^ [i] := node^.element_value^.field_values^ [2].value^.program_name_value;
        node := node^.link;
      FOREND;

      next_change := change_list;

      WHILE (next_change <> NIL) DO
        xdcl_list.link := next_change^.nlm^.changed_info^.entry_points;

        FOR i := LOWERBOUND (new_names^) TO UPPERBOUND (old_names^) DO
          ocp$search_xdcl_list (new_names^ [i], ^xdcl_list, found, xdcl_before);
          IF found THEN
            IF NOT multiple_modules THEN
              osp$set_status_abnormal (oc, oce$w_xdcl_already_exists, new_names^ [i], status);
              ocp$generate_message (status);
              osp$set_status_abnormal (oc, oce$e_some_attributes_not, '', command_status);
            IFEND;
          ELSE
            ocp$search_xdcl_list (old_names^ [i], ^xdcl_list, found, xdcl_before);
            IF NOT found THEN
              IF NOT multiple_modules THEN
                osp$set_status_abnormal (oc, oce$w_xdcl_doesnt_exist, old_names^ [i], status);
                ocp$generate_message (status);
                osp$set_status_abnormal (oc, oce$e_some_attributes_not, '', command_status);
              IFEND;
            ELSE
              xdcl_before^.link^.name := new_names^ [i];

              IF old_names^ [i] = next_change^.nlm^.changed_info^.starting_procedure THEN
                next_change^.nlm^.changed_info^.starting_procedure := new_names^ [i];
              IFEND;
            IFEND;
          IFEND;
        FOREND;

        next_change := next_change^.link;
      WHILEND;


    PROCEND process_substitutions;
?? OLDTITLE ??
?? NEWTITLE := 'process_omissions', EJECT ??

    PROCEDURE process_omissions
      (    parameter: clt$parameter_value;
           change_list: ^oct$nlm_modification_list;
       VAR status: ost$status);


      VAR
        names: ^oct$names,
        i: integer,
        next_change: ^oct$nlm_modification_list,
        node: ^clt$data_value,
        number_of_names: clt$list_size,
        found: boolean,
        xdcl_list: oct$external_declaration_list,
        xdcl_before: ^oct$external_declaration_list;


      status.normal := TRUE;
      number_of_names := clp$count_list_elements (parameter.value);
      NEXT names: [1 .. number_of_names] IN ocv$olg_scratch_seq;
      IF (names = NIL) THEN
        osp$set_status_condition (oce$e_internal_olg_seg_overflow, status);
        RETURN;
      IFEND;
      node := parameter.value;
      FOR i := 1 TO number_of_names DO
        names^ [i] := node^.element_value^.program_name_value;
        node := node^.link;
      FOREND;

      next_change := change_list;

      WHILE (next_change <> NIL) DO
        xdcl_list.link := next_change^.nlm^.changed_info^.entry_points;

        FOR i := LOWERBOUND (names^) TO UPPERBOUND (names^) DO
          ocp$search_xdcl_list (names^ [i], ^xdcl_list, found, xdcl_before);
          IF NOT found THEN
            IF NOT multiple_modules THEN
              osp$set_status_abnormal (oc, oce$w_xdcl_doesnt_exist, names^ [i], status);
              ocp$generate_message (status);
              osp$set_status_condition (oce$e_some_attributes_not, command_status);
            IFEND;
          ELSE
            xdcl_before^.link^.name := osc$null_name;

            IF names^ [i] = next_change^.nlm^.changed_info^.starting_procedure THEN
              next_change^.nlm^.changed_info^.starting_procedure := osc$null_name;
            IFEND;
          IFEND;
        FOREND;

        next_change := next_change^.link;
      WHILEND;


    PROCEND process_omissions;
?? OLDTITLE ??
?? NEWTITLE := 'process_ep_attributes', EJECT ??

    PROCEDURE process_ep_attributes
      (    parameter: clt$parameter_value;
           attribute: llt$entry_point_attributes;
           kind_of_change: oct$attribute_change;
           change_list: ^oct$nlm_modification_list;
       VAR status: ost$status);


      VAR
        found: boolean,
        i: integer,
        names: ^oct$names,
        next_change: ^oct$nlm_modification_list,
        number_of_names: clt$list_size,
        xdcl_list: oct$external_declaration_list,
        x_dcl: ^oct$external_declaration_list,
        xdcl_before: ^oct$external_declaration_list;

      status.normal := TRUE;
      next_change := change_list;
      WHILE (next_change <> NIL) DO
        IF parameter.value^.kind = clc$keyword THEN

{ Add all names to the change list.

          xdcl_list.link := next_change^.nlm^.changed_info^.entry_points;
          x_dcl := xdcl_list.link;
          WHILE (x_dcl <> NIL) DO
            IF (kind_of_change = add_attribute) THEN
              x_dcl^.attributes := x_dcl^.attributes + attribute;
            ELSE
              x_dcl^.attributes := x_dcl^.attributes - attribute;
            IFEND;
            x_dcl := x_dcl^.link;
          WHILEND;
        ELSE

{ Get list of names to change.

          number_of_names := clp$count_list_elements (parameter.value);
          NEXT names: [1 .. number_of_names] IN ocv$olg_scratch_seq;
          IF (names = NIL) THEN
            osp$set_status_condition (oce$e_internal_olg_seg_overflow, status);
            RETURN;
          IFEND;
          node := parameter.value;
          FOR i := 1 TO number_of_names DO
            names^ [i] := node^.element_value^.program_name_value;
            node := node^.link;
          FOREND;
          xdcl_list.link := next_change^.nlm^.changed_info^.entry_points;

          FOR i := LOWERBOUND (names^) TO UPPERBOUND (names^) DO
            ocp$search_xdcl_list (names^ [i], ^xdcl_list, found, xdcl_before);
            IF NOT found THEN
              IF NOT multiple_modules THEN
                osp$set_status_abnormal (oc, oce$w_xdcl_doesnt_exist, names^ [i], status);
                ocp$generate_message (status);
                osp$set_status_condition (oce$e_some_attributes_not, command_status);
              IFEND;
            ELSE
              IF (kind_of_change = add_attribute) THEN
                xdcl_before^.link^.attributes := xdcl_before^.link^.attributes + attribute;
              ELSE
                xdcl_before^.link^.attributes := xdcl_before^.link^.attributes - attribute;
              IFEND;
            IFEND;
          FOREND;

        IFEND;
        next_change := next_change^.link;
      WHILEND;


    PROCEND process_ep_attributes;
?? OLDTITLE ??
?? NEWTITLE := 'process_starting_procedure', EJECT ??

    PROCEDURE process_starting_procedure
      (    parameter: clt$parameter_value;
           change_list: ^oct$nlm_modification_list;
       VAR status: ost$status);


      VAR
        next_change: ^oct$nlm_modification_list,
        found: boolean,
        starting_procedure: pmt$program_name,
        xdcl_list: oct$external_declaration_list,
        xdcl_before: ^oct$external_declaration_list;

      status.normal := TRUE;
      next_change := change_list;
      starting_procedure := parameter.value^.program_name_value;
      WHILE (next_change <> NIL) DO
        xdcl_list.link := next_change^.nlm^.changed_info^.entry_points;

        ocp$search_xdcl_list (starting_procedure, ^xdcl_list, found, xdcl_before);
        IF NOT found THEN
          IF NOT multiple_modules THEN
            osp$set_status_abnormal (oc, oce$w_xdcl_doesnt_exist, starting_procedure, status);
            ocp$generate_message (status);
            osp$set_status_condition (oce$e_some_attributes_not, command_status);
          IFEND;
        ELSE
          next_change^.nlm^.changed_info^.starting_procedure := starting_procedure;
        IFEND;

        next_change := next_change^.link;
      WHILEND;


    PROCEND process_starting_procedure;
?? OLDTITLE ??
?? NEWTITLE := 'process_omit_non_retained_eps', EJECT ??

    PROCEDURE process_omit_non_retained_eps
      (    parameter: clt$parameter_value;
           change_list: ^oct$nlm_modification_list);

      VAR
        next_change: ^oct$nlm_modification_list,
        x_dcl: ^oct$external_declaration_list;

      IF (parameter.value^.boolean_value.value) THEN
        next_change := change_list;

        WHILE (next_change <> NIL) DO
          x_dcl := next_change^.nlm^.changed_info^.entry_points;

          WHILE (x_dcl <> NIL) DO
            IF (next_change^.nlm^.changed_info^.starting_procedure <> x_dcl^.name) THEN
              IF NOT (llc$retain_entry_point IN x_dcl^.attributes) THEN
                x_dcl^.name := osc$null_name;
              IFEND;
            IFEND;

            x_dcl := x_dcl^.link;
          WHILEND;

          next_change := next_change^.link;
        WHILEND;
      IFEND;


    PROCEND process_omit_non_retained_eps;
?? OLDTITLE ??
?? NEWTITLE := 'process_library_additions', EJECT ??

    PROCEDURE process_library_additions
      (    parameter: clt$parameter_value;
           change_list: ^oct$nlm_modification_list;
       VAR status: ost$status);


      VAR
        libraries: ^oct$names,
        next_change: ^oct$nlm_modification_list,
        i: integer,
        library_list: oct$name_list,
        library: ^oct$name_list,
        node: ^clt$data_value,
        number_of_libraries: clt$list_size;

      status.normal := TRUE;
      number_of_libraries := clp$count_list_elements (parameter.value);
      NEXT libraries: [1 .. number_of_libraries] IN ocv$olg_scratch_seq;
      IF (libraries = NIL) THEN
        osp$set_status_condition (oce$e_internal_olg_seg_overflow, status);
        RETURN;
      IFEND;
      node := parameter.value;
      FOR i := 1 TO number_of_libraries DO
        libraries^ [i] := node^.element_value^.name_value;
        node := node^.link;
      FOREND;
      next_change := change_list;

      WHILE (next_change <> NIL) DO
        library_list.link := next_change^.nlm^.changed_info^.library_list;

        FOR i := LOWERBOUND (libraries^) TO UPPERBOUND (libraries^) DO

          library := ^library_list;
          WHILE (library^.link <> NIL) AND (library^.link^.name <> libraries^ [i]) DO
            library := library^.link;
          WHILEND;

          IF library^.link = NIL THEN
            ALLOCATE library^.link IN ocv$olg_working_heap^;
            library := library^.link;
            IF library = NIL THEN
              osp$set_status_condition (oce$e_internal_olg_seg_overflow, status);
              RETURN;
            IFEND;

            library^.name := libraries^ [i];
            library^.link := NIL;
          IFEND;
        FOREND;

        next_change^.nlm^.changed_info^.new_libraries := TRUE;
        next_change^.nlm^.changed_info^.library_list := library_list.link;

        next_change := next_change^.link;
      WHILEND;


    PROCEND process_library_additions;
?? OLDTITLE ??
?? NEWTITLE := 'process_library_omissions', EJECT ??

    PROCEDURE process_library_omissions
      (    parameter: clt$parameter_value;
           change_list: ^oct$nlm_modification_list;
       VAR status: ost$status);


      VAR
        libraries: ^oct$names,
        next_change: ^oct$nlm_modification_list,
        i: integer,
        library_list: oct$name_list,
        library: ^oct$name_list,
        node: ^clt$data_value,
        number_of_libraries: clt$list_size;

      status.normal := TRUE;
      number_of_libraries := clp$count_list_elements (parameter.value);
      NEXT libraries: [1 .. number_of_libraries] IN ocv$olg_scratch_seq;
      IF (libraries = NIL) THEN
        osp$set_status_condition (oce$e_internal_olg_seg_overflow, status);
        RETURN;
      IFEND;
      node := parameter.value;
      FOR i := 1 TO number_of_libraries DO
        libraries^ [i] := node^.element_value^.name_value;
        node := node^.link;
      FOREND;
      next_change := change_list;

      WHILE (next_change <> NIL) DO
        library_list.link := next_change^.nlm^.changed_info^.library_list;

        FOR i := LOWERBOUND (libraries^) TO UPPERBOUND (libraries^) DO

          library := ^library_list;
          WHILE (library^.link <> NIL) AND (library^.link^.name <> libraries^ [i]) DO
            library := library^.link;
          WHILEND;

          IF library^.link = NIL THEN
            IF NOT multiple_modules THEN
              osp$set_status_abnormal (oc, oce$w_library_not_found, libraries^ [i], status);
              ocp$generate_message (status);
              osp$set_status_condition (oce$e_some_attributes_not, command_status);
            IFEND;
          ELSE
            library^.link := library^.link^.link;
          IFEND;
        FOREND;

        next_change^.nlm^.changed_info^.new_libraries := TRUE;
        next_change^.nlm^.changed_info^.library_list := library_list.link;

        next_change := next_change^.link;
      WHILEND;


    PROCEND process_library_omissions;
?? OLDTITLE ??
?? NEWTITLE := 'process_omit_debug_tables', EJECT ??

    PROCEDURE process_omit_debug_tables
      (    parameter: clt$parameter_value;
           change_list: ^oct$nlm_modification_list);

      VAR
        debug_tables_to_omit: oct$debug_tables,
        next_change: ^oct$nlm_modification_list,
        node: ^clt$data_value;

      debug_tables_to_omit := $oct$debug_tables [];
      IF parameter.value^.kind = clc$keyword THEN

{ Omit all debug tables.

        debug_tables_to_omit := -$oct$debug_tables [];
      ELSE
        node := parameter.value;
        WHILE (node <> NIL) AND (node^.element_value <> NIL) DO
          IF node^.element_value^.keyword_value = 'LINE_TABLE' THEN
            debug_tables_to_omit := debug_tables_to_omit + $oct$debug_tables [occ$line_table];
          ELSEIF node^.element_value^.keyword_value = 'SYMBOL_TABLE' THEN
            debug_tables_to_omit := debug_tables_to_omit + $oct$debug_tables [occ$symbol_table];
          ELSEIF node^.element_value^.keyword_value = 'SUPPLEMENTAL_DEBUG_TABLE' THEN
            debug_tables_to_omit := debug_tables_to_omit + $oct$debug_tables [occ$supplemental_debug_table];
          ELSEIF node^.element_value^.keyword_value = 'PARAMETER_CHECKING' THEN
            debug_tables_to_omit := debug_tables_to_omit + $oct$debug_tables [occ$parameter_checking];
          IFEND;
          node := node^.link;
        WHILEND;
      IFEND;
      IF debug_tables_to_omit = $oct$debug_tables [] THEN
        RETURN;
      IFEND;
      next_change := change_list;

      WHILE (next_change <> NIL) DO
        next_change^.nlm^.changed_info^.debug_tables_to_omit :=
              next_change^.nlm^.changed_info^.debug_tables_to_omit + debug_tables_to_omit;

        next_change := next_change^.link;
      WHILEND;


    PROCEND process_omit_debug_tables;
?? OLDTITLE ??
?? NEWTITLE := 'process_comment', EJECT ??

    PROCEDURE process_comment
      (    parameter: clt$parameter_value;
           change_list: ^oct$nlm_modification_list;
       VAR status: ost$status);


      VAR
        next_change: ^oct$nlm_modification_list,
        nlm: ^oct$new_library_module_list;

      status.normal := TRUE;
      next_change := change_list;

      WHILE (next_change <> NIL) DO
        nlm := next_change^.nlm;

        IF nlm^.changed_info^.commentary = NIL THEN
          ALLOCATE nlm^.changed_info^.commentary IN ocv$olg_working_heap^;
          IF nlm^.changed_info^.commentary = NIL THEN
            osp$set_status_condition (oce$e_internal_olg_seg_overflow, status);
            RETURN;
          IFEND;
        IFEND;

        nlm^.changed_info^.commentary^ := parameter.value^.string_value^;

        next_change := next_change^.link;
      WHILEND;


    PROCEND process_comment;
?? OLDTITLE ??
?? NEWTITLE := 'process_application_identifier', EJECT ??

    PROCEDURE process_application_identifier
      (    parameter: clt$parameter_value;
           change_list: ^oct$nlm_modification_list;
       VAR status: ost$status);

      VAR
        next_change: ^oct$nlm_modification_list,
        nlm: ^oct$new_library_module_list;

      status.normal := TRUE;
      next_change := change_list;

      WHILE (next_change <> NIL) DO
        nlm := next_change^.nlm;

        CASE nlm^.description^.kind OF
        = occ$cpu_object_module, occ$load_module, occ$bound_module, occ$temporary_load_module,
              occ$program_description, occ$command_procedure, occ$command_description,
              occ$applic_command_procedure, occ$applic_program_description, occ$applic_command_description =
          ;
        ELSE
          osp$set_status_abnormal (oc, oce$cannot_be_an_application, nlm^.name, status);
          RETURN;
        CASEND;

        IF nlm^.changed_info^.application_identifier = NIL THEN
          ALLOCATE nlm^.changed_info^.application_identifier IN ocv$olg_working_heap^;
          IF nlm^.changed_info^.application_identifier = NIL THEN
            osp$set_status_condition (oce$e_internal_olg_seg_overflow, status);
            RETURN;
          IFEND;
        IFEND;

        IF pvt [p$application_identifier].value^.kind = clc$keyword THEN

{ Set application identifier to $unspecified.

          nlm^.changed_info^.application_identifier^.name := osc$null_name;
        ELSE
          nlm^.changed_info^.application_identifier^.name := parameter.value^.name_value;
        IFEND;

        next_change := next_change^.link;
      WHILEND;

    PROCEND process_application_identifier;
?? OLDTITLE ??
?? NEWTITLE := 'process_parameter_checking', EJECT ??

{ PURPOSE:
{   The purpose of this procedure is to process the CYBIL_PARAMETER_CHECKING
{   parameter.  It determines if the module(s) to be changed were generated
{   by CYBIL; if not, the module attributes are unchanged.

    PROCEDURE process_parameter_checking
      (    parameter: clt$parameter_value;
           change_list: ^oct$nlm_modification_list;
       VAR status: ost$status);

      VAR
        component_index: 1 .. llc$max_components,
        component_pointer: ^llt$component_information,
        file: ^SEQ ( * ),
        found_a_cybil_component: boolean,
        identification: ^llt$identification,
        information_element_header: ^llt$info_element_header,
        interpretive_element: ^llt$object_text_descriptor,
        next_change: ^oct$nlm_modification_list,
        nlm: ^oct$new_library_module_list;

      status.normal := TRUE;
      next_change := change_list;

      WHILE (next_change <> NIL) DO
        nlm := next_change^.nlm;

      /check_for_right_type_of_module/
        BEGIN
          CASE nlm^.description^.kind OF
          = occ$cpu_object_module =
            IF nlm^.description^.cpu_object_module_header^.identification^.generator_id <> llc$cybil THEN
              osp$set_status_abnormal (oc, oce$w_param_checking_not_cybil, nlm^.name, status);
              ocp$generate_message (status);
              osp$set_status_condition (oce$e_some_attributes_not, command_status);
              EXIT /check_for_right_type_of_module/;
            IFEND;
          = occ$load_module =
            information_element_header := #PTR (nlm^.description^.load_module_header^.information_element,
                  nlm^.description^.file^);
            IF information_element_header = NIL THEN
              osp$set_status_abnormal (oc, oce$e_premature_eof_in_module, nlm^.name, status);
              RETURN;
            IFEND;
            IF information_element_header^.number_of_components = 0 THEN

{ Module is not bound; check identification record for generator.

              interpretive_element := #PTR (nlm^.description^.load_module_header^.interpretive_element,
                    nlm^.description^.file^);
              IF interpretive_element = NIL THEN
                osp$set_status_abnormal (oc, oce$e_premature_eof_in_module, nlm^.name, status);
                RETURN;
              IFEND;
              IF interpretive_element^.kind <> llc$identification THEN
                osp$set_status_abnormal (oc, oce$e_no_ident_rec_on_load_mod, nlm^.name, status);
                RETURN;
              IFEND;
              file := nlm^.description^.file;
              RESET file TO interpretive_element;
              NEXT interpretive_element IN file;
              NEXT identification IN file;
              IF identification^.generator_id <> llc$cybil THEN
                osp$set_status_abnormal (oc, oce$w_param_checking_not_cybil, nlm^.name, status);
                ocp$generate_message (status);
                osp$set_status_condition (oce$e_some_attributes_not, command_status);
                EXIT /check_for_right_type_of_module/;
              IFEND;
            ELSE

{ Module is bound; check for a CYBIL component.

              found_a_cybil_component := FALSE;
              component_pointer := #PTR (information_element_header^.component_ptr, nlm^.description^.file^);
              IF component_pointer = NIL THEN
                osp$set_status_abnormal (oc, oce$e_premature_eof_in_module, nlm^.name, status);
                RETURN;
              IFEND;

            /look_for_a_cybil_component/
              FOR component_index := 1 TO information_element_header^.number_of_components DO
                IF component_pointer^ [component_index].generator_id = llc$cybil THEN
                  found_a_cybil_component := TRUE;
                  EXIT /look_for_a_cybil_component/;
                IFEND;
              FOREND /look_for_a_cybil_component/;
              IF NOT found_a_cybil_component THEN
                osp$set_status_abnormal (oc, oce$w_param_checking_not_cybil, nlm^.name, status);
                ocp$generate_message (status);
                osp$set_status_condition (oce$e_some_attributes_not, command_status);
                EXIT /check_for_right_type_of_module/;
              IFEND;
            IFEND;
          = occ$bound_module =
            IF nlm^.description^.bound_module_header^.identification.generator_id <> llc$cybil THEN
              osp$set_status_abnormal (oc, oce$w_param_checking_not_cybil, nlm^.name, status);
              ocp$generate_message (status);
              osp$set_status_condition (oce$e_some_attributes_not, command_status);
              EXIT /check_for_right_type_of_module/;
            IFEND;
          = occ$temporary_load_module =
            IF nlm^.description^.temporary_module_header^.identification.generator_id <> llc$cybil THEN
              osp$set_status_abnormal (oc, oce$w_param_checking_not_cybil, nlm^.name, status);
              ocp$generate_message (status);
              osp$set_status_condition (oce$e_some_attributes_not, command_status);
              EXIT /check_for_right_type_of_module/;
            IFEND;
          ELSE
            osp$set_status_abnormal (oc, oce$w_param_checking_not_cybil, nlm^.name, status);
            ocp$generate_message (status);
            osp$set_status_condition (oce$e_some_attributes_not, command_status);
            EXIT /check_for_right_type_of_module/;
          CASEND;

          IF (parameter.value^.keyword_value = object_type_checking) THEN
            nlm^.changed_info^.cybil_parameter_checking := object_type_checking;
          IFEND;
        END /check_for_right_type_of_module/;

        next_change := next_change^.link;
      WHILEND;
    PROCEND process_parameter_checking;
?? OLDTITLE ??
?? EJECT ??

    VAR
      change_list: oct$nlm_modification_list,
      first_module: pmt$program_name,
      ignore_status: ost$status,
      last_module: pmt$program_name,
      multiple_modules: boolean,
      node: ^clt$data_value;

    status.normal := TRUE;
    command_status.normal := TRUE;
    established_conditions.selector := pmc$condition_combination;
    established_conditions.combination := $pmt$condition_combination
          [ifc$interactive_condition, pmc$block_exit_processing];


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

    RESET ocv$olg_scratch_seq;

    pmp$establish_condition_handler (established_conditions, ^condition_handler, ^established_descriptor,
          status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

  /protect/
    BEGIN
      multiple_modules := FALSE;
      change_list.link := NIL;
      IF pvt [p$module].value^.kind = clc$keyword THEN

{ Add all modules, if there are any, to the list of modules to change.

        IF ocv$nlm_list^.f_link^.name = osc$null_name THEN
          EXIT /protect/;
        ELSE
          multiple_modules := TRUE;
          first_module := ocv$nlm_list^.f_link^.name;
          last_module := ocv$nlm_list^.b_link^.name;
          add_modules_to_change_list (first_module, last_module, ^change_list, status);
          IF NOT status.normal THEN
            EXIT /protect/;
          IFEND;
        IFEND;
      ELSE

{ Get lists of modules to change.

        node := pvt [p$module].value;
        WHILE (node <> NIL) AND (node^.element_value <> NIL) DO
          IF node^.element_value^.kind = clc$range THEN
            first_module := node^.element_value^.low_value^.program_name_value;
            last_module := node^.element_value^.high_value^.program_name_value;
          ELSE
            first_module := node^.element_value^.program_name_value;
            last_module := first_module;
          IFEND;
          add_modules_to_change_list (first_module, last_module, ^change_list, status);
          IF NOT status.normal THEN
            EXIT /protect/;
          IFEND;
          node := node^.link;
        WHILEND;
      IFEND;
      IF change_list.link = NIL THEN
        status := command_status;
        EXIT /protect/;
      ELSE
        multiple_modules := (change_list.link^.link <> NIL);
      IFEND;

      IF pvt [p$new_name].specified THEN
        change_module_name (pvt [p$new_name], change_list.link, status);
        IF NOT status.normal THEN
          EXIT /protect/;
        IFEND;
      IFEND;

      IF (pvt [p$substitute].specified) OR (pvt [p$omit].specified) OR
            (pvt [p$gate].specified) OR (pvt [p$not_gate].specified) OR (pvt [p$starting_procedure].
            specified) OR (pvt [p$retain].specified) OR (pvt [p$not_retain].specified) OR
            (pvt [p$omit_non_retained_entry_point].specified) THEN
        build_xdcl_lists (change_list.link, status);
        IF NOT status.normal THEN
          EXIT /protect/;
        IFEND;

        IF pvt [p$substitute].specified THEN
          process_substitutions (pvt [p$substitute], change_list.link, status);
          IF NOT status.normal THEN
            EXIT /protect/;
          IFEND;
        IFEND;

        IF pvt [p$omit].specified THEN
          process_omissions (pvt [p$omit], change_list.link, status);
          IF NOT status.normal THEN
            EXIT /protect/;
          IFEND;
        IFEND;

        IF pvt [p$gate].specified THEN
          process_ep_attributes (pvt [p$gate], $llt$entry_point_attributes [llc$gated_entry_point],
                add_attribute, change_list.link, status);
          IF NOT status.normal THEN
            EXIT /protect/;
          IFEND;
        IFEND;

        IF pvt [p$not_gate].specified THEN
          process_ep_attributes (pvt [p$not_gate], $llt$entry_point_attributes [llc$gated_entry_point],
                remove_attribute, change_list.link, status);
          IF NOT status.normal THEN
            EXIT /protect/;
          IFEND;
        IFEND;

        IF pvt [p$retain].specified THEN
          process_ep_attributes (pvt [p$retain], $llt$entry_point_attributes [llc$retain_entry_point],
                add_attribute, change_list.link, status);
          IF NOT status.normal THEN
            EXIT /protect/;
          IFEND;
        IFEND;

        IF pvt [p$not_retain].specified THEN
          process_ep_attributes (pvt [p$not_retain], $llt$entry_point_attributes [llc$retain_entry_point],
                remove_attribute, change_list.link, status);
          IF NOT status.normal THEN
            EXIT /protect/;
          IFEND;
        IFEND;

        IF pvt [p$starting_procedure].specified THEN
          process_starting_procedure (pvt [p$starting_procedure], change_list.link, status);
          IF NOT status.normal THEN
            EXIT /protect/;
          IFEND;
        IFEND;

        IF pvt [p$omit_non_retained_entry_point].specified THEN
          process_omit_non_retained_eps (pvt [p$omit_non_retained_entry_point], change_list.link);
        IFEND;
      IFEND;


      IF (pvt [p$add_library].specified) OR (pvt [p$omit_library].specified) THEN
        build_library_lists (change_list.link, status);
        IF NOT status.normal THEN
          EXIT /protect/;
        IFEND;

        IF pvt [p$add_library].specified THEN
          process_library_additions (pvt [p$add_library], change_list.link, status);
          IF NOT status.normal THEN
            EXIT /protect/;
          IFEND;
        IFEND;

        IF pvt [p$omit_library].specified THEN
          process_library_omissions (pvt [p$omit_library], change_list.link, status);
          IF NOT status.normal THEN
            EXIT /protect/;
          IFEND;
        IFEND;
      IFEND;

      IF pvt [p$omit_debug_tables].specified THEN
        process_omit_debug_tables (pvt [p$omit_debug_tables], change_list.link);
      IFEND;

      IF pvt [p$comment].specified THEN
        process_comment (pvt [p$comment], change_list.link, status);
        IF NOT status.normal THEN
          EXIT /protect/;
        IFEND;
      IFEND;

      IF pvt [p$application_identifier].specified THEN
        avp$get_capability (avc$application_administration, avc$user, application_administrator, status);
        IF NOT status.normal THEN
          EXIT /protect/;
        ELSEIF NOT application_administrator THEN
          osp$set_status_condition (oce$not_application_administrtr, status);
          EXIT /protect/;
        ELSE
          process_application_identifier (pvt [p$application_identifier], change_list.link, status);
          IF NOT status.normal THEN
            EXIT /protect/;
          IFEND;
        IFEND;
      IFEND;

      IF pvt [p$cybil_parameter_checking].specified THEN
        process_parameter_checking (pvt [p$cybil_parameter_checking], change_list.link, status);
        IF NOT status.normal THEN
          EXIT /protect/;
        IFEND;
      IFEND;
      status := command_status;
    END /protect/;
    pmp$disestablish_cond_handler (established_conditions, ignore_status);


  PROCEND ocp$_change_module_attribute;

MODEND ocm$change;
