?? RIGHT := 110 ??                                                                                            
?? NEWTITLE := 'NOS/VE:  Object Library Generator' ??                                                         
MODULE ocm$build_module_attributes;                                                                           
                                                                                                              
                                                                                                              
                                                                                                              
{ PURPOSE:                                                                                                    
{   To return information about a specific module in scl data structures.                                     
                                                                                                              
?? PUSH (LISTEXT := ON) ??                                                                                    
*copyc llt$object_module                                                                                      
*copyc llt$load_module                                                                                        
*copyc oce$library_generator_errors                                                                           
*copyc oct$attribute_keyword_set                                                                              
*copyc oct$changed_info                                                                                       
*copyc oct$external_reference_list                                                                            
*copyc oct$header                                                                                             
*copyc oct$module_attribute_keywords                                                                          
*copyc oct$module_description                                                                                 
*copyc oct$name_list                                                                                          
*copyc ocs$literals                                                                                           
?? POP ??                                                                                                     
*copyc clp$evaluate_parameters                                                                                
*copyc clp$get_message_module_info                                                                            
*copyc clp$make_boolean_value                                                                                 
*copyc clp$make_integer_value                                                                                 
*copyc clp$make_keyword_value                                                                                 
*copyc clp$make_list_value                                                                                    
*copyc clp$make_name_value                                                                                    
*copyc clp$make_program_name_value                                                                            
*copyc clp$make_range_value                                                                                   
*copyc clp$make_record_value                                                                                  
*copyc clp$make_status_code_value                                                                             
*copyc clp$make_string_value                                                                                  
*copyc clp$make_unspecified_value                                                                             
*copyc clp$trimmed_string_size                                                                                
*copyc ocp$make_date_time_value                                                                               
*copyc ocp$make_file_value                                                                                    
*copyc ocp$make_library_member_kind_va                                                                        
*copyc ocp$make_module_generator_value                                                                        
*copyc ocp$make_module_kind_value                                                                             
*copyc ocp$obtain_component_info                                                                              
*copyc ocp$obtain_header                                                                                      
*copyc ocp$obtain_library_list                                                                                
*copyc ocp$obtain_xdcl_list                                                                                   
*copyc ocp$obtain_xref_list                                                                                   
*copyc osp$get_status_condition_string                                                                        
*copyc osp$set_status_abnormal                                                                                
?? NEWTITLE := 'Global Declarations Declared by This Module', EJECT ??                                        
                                                                                                              
?? FMT (FORMAT := OFF) ??                                                                                     
  VAR                                                                                                         
    ocv$module_attribute_keys: [XDCL, READ, ocs$literals                                                      
] array [1 .. occ$kwd_maximum] of record                                                                      
      attribute: oct$module_attribute_keywords,                                                               
      name: ost$name,                                                                                         
    recend := [                                                                                               
     [occ$kwd_abort_file             , 'ABORT_FILE'],                                                         
     [occ$kwd_aliases                , 'ALIASES'],                                                            
     [occ$kwd_all                    , 'ALL'],                                                                
     [occ$kwd_application_identifier , 'APPLICATION_IDENTIFIER'],                                             
     [occ$kwd_arithmetic_loss_of_sig , 'ARITHMETIC_LOSS_OF_SIGNIFICANCE'],                                    
     [occ$kwd_arithmetic_overflow    , 'ARITHMETIC_OVERFLOW'],                                                
     [occ$kwd_availability           , 'AVAILABILITY'],                                                       
     [occ$kwd_comment                , 'COMMENT'],                                                            
     [occ$kwd_components             , 'COMPONENTS'],                                                         
     [occ$kwd_creation_date_time     , 'CREATION_DATE_TIME'],                                                 
     [occ$kwd_debug_input            , 'DEBUG_INPUT'],                                                        
     [occ$kwd_debug_mode             , 'DEBUG_MODE'],                                                         
     [occ$kwd_debug_output           , 'DEBUG_OUTPUT'],                                                       
     [occ$kwd_divide_fault           , 'DIVIDE_FAULT'],                                                       
     [occ$kwd_entry_points           , 'ENTRY_POINTS'],                                                       
     [occ$kwd_exponent_overflow      , 'EXPONENT_OVERFLOW'],                                                  
     [occ$kwd_exponent_underflow     , 'EXPONENT_UNDERFLOW'],                                                 
     [occ$kwd_fp_indefinite          , 'FP_INDEFINITE'],                                                      
     [occ$kwd_fp_loss_of_significance, 'FP_LOSS_OF_SIGNIFICANCE'],                                            
     [occ$kwd_generator              , 'GENERATOR'],                                                          
     [occ$kwd_generator_version      , 'GENERATOR_VERSION'],                                                  
     [occ$kwd_header                 , 'HEADER'],                                                             
     [occ$kwd_invalid_bdp_data       , 'INVALID_BDP_DATA'],                                                   
     [occ$kwd_kind                   , 'KIND'],                                                               
     [occ$kwd_libraries              , 'LIBRARIES'],                                                          
     [occ$kwd_load_map               , 'LOAD_MAP'],                                                           
     [occ$kwd_load_map_options       , 'LOAD_MAP_OPTIONS'],                                                   
     [occ$kwd_log_option             , 'LOG_OPTION'],                                                         
     [occ$kwd_modules                , 'MODULES'],                                                            
     [occ$kwd_module_kind            , 'MODULE_KIND'],                                                        
     [occ$kwd_name                   , 'NAME'],                                                               
     [occ$kwd_natural_language       , 'NATURAL_LANGUAGE'],                                                   
     [occ$kwd_object_files           , 'OBJECT_FILES'],                                                       
     [occ$kwd_online_manual          , 'ONLINE_MANUAL'],                                                      
     [occ$kwd_preset_value           , 'PRESET_VALUE'],                                                       
     [occ$kwd_program_attributes     , 'PROGRAM_ATTRIBUTES'],                                                 
     [occ$kwd_references             , 'REFERENCES'],                                                         
     [occ$kwd_scope                  , 'SCOPE'],                                                              
     [occ$kwd_stack_size             , 'STACK_SIZE'],                                                         
     [occ$kwd_starting_procedure     , 'STARTING_PROCEDURE'],                                                 
     [occ$kwd_status_codes           , 'STATUS_CODES'],                                                       
     [occ$kwd_system_command_name    , 'SYSTEM_COMMAND_NAME'],                                                
     [occ$kwd_termination_error_level, 'TERMINATION_ERROR_LEVEL'],                                            
     [occ$kwd_text_kind              , 'TEXT_KIND']];                                                         
?? FMT (FORMAT := ON) ??                                                                                      
                                                                                                              
  TYPE                                                                                                        
    field_values = array [1 .. * ] of clt$field_value;                                                        
                                                                                                              
  TYPE                                                                                                        
    attribute_info = record                                                                                   
      kind: ost$name,                                                                                         
      valid_attributes: oct$attribute_keyword_set,                                                            
    recend;                                                                                                   
                                                                                                              
  TYPE                                                                                                        
    text_module_kind = record                                                                                 
      case valid: boolean of                                                                                  
      = TRUE =                                                                                                
        text_kind: llt$module_kind,                                                                           
      casend,                                                                                                 
    recend;                                                                                                   
                                                                                                              
  VAR                                                                                                         
    program_attributes_group: [STATIC, READ, ocs$literals] oct$attribute_keyword_set :=                       
          [occ$kwd_name, occ$kwd_kind, occ$kwd_abort_file, occ$kwd_arithmetic_overflow,                       
          occ$kwd_arithmetic_loss_of_sig, occ$kwd_debug_input, occ$kwd_debug_mode, occ$kwd_debug_output,      
          occ$kwd_divide_fault, occ$kwd_exponent_overflow, occ$kwd_exponent_underflow, occ$kwd_fp_indefinite, 
          occ$kwd_fp_loss_of_significance, occ$kwd_invalid_bdp_data, occ$kwd_libraries, occ$kwd_load_map,     
          occ$kwd_load_map_options, occ$kwd_modules, occ$kwd_object_files, occ$kwd_preset_value,              
          occ$kwd_stack_size, occ$kwd_starting_procedure, occ$kwd_termination_error_level];                   
                                                                                                              
  VAR                                                                                                         
    header_attributes: [STATIC, READ, ocs$literals] oct$attribute_keyword_set :=                              
          [occ$kwd_name, occ$kwd_kind, occ$kwd_comment, occ$kwd_creation_date_time, occ$kwd_generator,        
          occ$kwd_generator_version];                                                                         
                                                                                                              
  VAR                                                                                                         
    command_description_attributes: [STATIC, READ, ocs$literals] attribute_info :=                            
          ['COMMAND_DESCRIPTION', [occ$kwd_name, occ$kwd_kind, occ$kwd_aliases,                               
          occ$kwd_application_identifier, occ$kwd_availability, occ$kwd_comment, occ$kwd_creation_date_time,  
          occ$kwd_generator, occ$kwd_generator_version, occ$kwd_libraries, occ$kwd_scope,                     
          occ$kwd_starting_procedure, occ$kwd_system_command_name]];                                          
                                                                                                              
  VAR                                                                                                         
    command_procedure_attributes: [STATIC, READ, ocs$literals] attribute_info :=                              
          ['COMMAND_PROCEDURE', [occ$kwd_name, occ$kwd_kind, occ$kwd_aliases, occ$kwd_application_identifier, 
          occ$kwd_availability, occ$kwd_comment, occ$kwd_creation_date_time, occ$kwd_generator,               
          occ$kwd_generator_version, occ$kwd_log_option, occ$kwd_scope]];                                     
                                                                                                              
  VAR                                                                                                         
    cpu_object_module_attributes: [STATIC, READ, ocs$literals] attribute_info :=                              
          ['CPU_MODULE', [occ$kwd_name, occ$kwd_kind, occ$kwd_application_identifier, occ$kwd_comment,        
          occ$kwd_creation_date_time, occ$kwd_entry_points, occ$kwd_generator, occ$kwd_generator_version,     
          occ$kwd_libraries, occ$kwd_references, occ$kwd_starting_procedure, occ$kwd_text_kind]];             
                                                                                                              
  VAR                                                                                                         
    form_module_attributes: [STATIC, READ, ocs$literals] attribute_info :=                                    
          ['FORM_MODULE', [occ$kwd_name, occ$kwd_kind, occ$kwd_comment, occ$kwd_creation_date_time,           
          occ$kwd_generator, occ$kwd_generator_version]];                                                     
                                                                                                              
  VAR                                                                                                         
    function_description_attributes: [STATIC, READ, ocs$literals] attribute_info :=                           
          ['FUNCTION_DESCRIPTION', [occ$kwd_name, occ$kwd_kind, occ$kwd_aliases, occ$kwd_availability,        
          occ$kwd_comment, occ$kwd_creation_date_time, occ$kwd_generator, occ$kwd_generator_version,          
          occ$kwd_libraries, occ$kwd_scope, occ$kwd_starting_procedure]];                                     
                                                                                                              
  VAR                                                                                                         
    function_procedure_attributes: [STATIC, READ, ocs$literals] attribute_info :=                             
          ['FUNCTION_PROCEDURE', [occ$kwd_name, occ$kwd_kind, occ$kwd_aliases, occ$kwd_availability,          
          occ$kwd_comment, occ$kwd_creation_date_time, occ$kwd_generator, occ$kwd_generator_version,          
          occ$kwd_scope]];                                                                                    
                                                                                                              
  VAR                                                                                                         
    load_module_attributes: [STATIC, READ, ocs$literals] attribute_info :=                                    
          ['LOAD_MODULE', [occ$kwd_name, occ$kwd_kind, occ$kwd_application_identifier, occ$kwd_comment,       
          occ$kwd_components, occ$kwd_creation_date_time, occ$kwd_entry_points, occ$kwd_generator,            
          occ$kwd_generator_version, occ$kwd_libraries, occ$kwd_references, occ$kwd_starting_procedure,       
          occ$kwd_text_kind]];                                                                                
                                                                                                              
  VAR                                                                                                         
    message_module_attributes: [STATIC, READ, ocs$literals] attribute_info :=                                 
          ['MESSAGE_MODULE', [occ$kwd_name, occ$kwd_kind, occ$kwd_comment, occ$kwd_creation_date_time,        
          occ$kwd_generator, occ$kwd_generator_version, occ$kwd_module_kind, occ$kwd_natural_language,        
          occ$kwd_online_manual, occ$kwd_status_codes]];                                                      
                                                                                                              
  VAR                                                                                                         
    ppu_object_module_attributes: [STATIC, READ, ocs$literals] attribute_info :=                              
          ['PPU_MODULE', [occ$kwd_name, occ$kwd_kind, occ$kwd_application_identifier, occ$kwd_comment,        
          occ$kwd_creation_date_time, occ$kwd_generator, occ$kwd_generator_version, occ$kwd_text_kind]];      
                                                                                                              
  VAR                                                                                                         
    program_description_attributes: [STATIC, READ, ocs$literals] attribute_info :=                            
          ['PROGRAM_DESCRIPTION', [occ$kwd_name, occ$kwd_kind, occ$kwd_aliases,                               
          occ$kwd_application_identifier, occ$kwd_availability, occ$kwd_comment, occ$kwd_creation_date_time,  
          occ$kwd_generator, occ$kwd_generator_version, occ$kwd_log_option, occ$kwd_scope, occ$kwd_abort_file,
          occ$kwd_arithmetic_overflow, occ$kwd_arithmetic_loss_of_sig, occ$kwd_debug_input,                   
          occ$kwd_debug_mode, occ$kwd_debug_output, occ$kwd_divide_fault, occ$kwd_exponent_overflow,          
          occ$kwd_exponent_underflow, occ$kwd_fp_indefinite, occ$kwd_fp_loss_of_significance,                 
          occ$kwd_invalid_bdp_data, occ$kwd_libraries, occ$kwd_load_map, occ$kwd_load_map_options,            
          occ$kwd_modules, occ$kwd_object_files, occ$kwd_preset_value, occ$kwd_stack_size,                    
          occ$kwd_starting_procedure, occ$kwd_termination_error_level]];                                      
                                                                                                              
?? OLDTITLE ??                                                                                                
?? NEWTITLE := 'build_message_module_attributes', EJECT ??                                                    
                                                                                                              
{ PURPOSE:                                                                                                    
{   Build the field values specific to message modules.                                                       
{                                                                                                             
{ GENERATED FIELDS:                                                                                           
{   module_kind: key                                                                                          
{     message_and_help_module, message_module, help_module                                                    
{   keyend                                                                                                    
{   natural_language: name                                                                                    
{   online_manual: program_name                                                                               
{   status_codes: range of status_code                                                                        
                                                                                                              
  PROCEDURE build_message_module_attributes                                                                   
    (    selected_attributes: oct$attribute_keyword_set;                                                      
         library_member_header: llt$library_member_header;                                                    
         changed_info: ^oct$changed_info;                                                                     
     VAR module_description: oct$module_description;                                                          
     VAR work_area: ^clt$work_area;                                                                           
     VAR fields: field_values;                                                                                
     VAR status: ost$status);                                                                                 
                                                                                                              
    VAR                                                                                                       
      message_template_module: ^ost$message_template_module;                                                  
                                                                                                              
    VAR                                                                                                       
      strng: string (255),                                                                                    
      length: integer,                                                                                        
      natural_language: ost$natural_language,                                                                 
      keyword: ost$name,                                                                                      
      online_manual: ost$online_manual_name,                                                                  
      help_module: boolean,                                                                                   
      message_module: boolean,                                                                                
      lowest_condition_code: ost$status_condition_code,                                                       
      highest_condition_code: ost$status_condition_code,                                                      
      condition_string: ost$string;                                                                           
                                                                                                              
                                                                                                              
    IF (selected_attributes * $oct$attribute_keyword_set [occ$kwd_module_kind, occ$kwd_natural_language,      
          occ$kwd_online_manual, occ$kwd_status_codes]) = $oct$attribute_keyword_set [] THEN                  
      RETURN;                                                                                                 
    IFEND;                                                                                                    
                                                                                                              
    message_template_module := #PTR (module_description.message_module_header^.member,                        
          module_description.file^);                                                                          
    IF message_template_module = NIL THEN                                                                     
      osp$set_status_abnormal ('OC', oce$e_premature_eof_in_module, library_member_header.name, status);      
      RETURN;                                                                                                 
    IFEND;                                                                                                    
                                                                                                              
    clp$get_message_module_info (message_template_module, natural_language, online_manual, help_module,       
          message_module, lowest_condition_code, highest_condition_code, status);                             
    IF NOT status.normal THEN                                                                                 
      RETURN;                                                                                                 
    IFEND;                                                                                                    
                                                                                                              
{ Module_type                                                                                                 
                                                                                                              
    IF occ$kwd_module_kind IN selected_attributes THEN                                                        
      IF message_module AND help_module THEN                                                                  
        keyword := 'MESSAGE_AND_HELP_MODULE';                                                                 
      ELSEIF message_module THEN                                                                              
        keyword := 'MESSAGE_MODULE';                                                                          
      ELSEIF help_module THEN                                                                                 
        keyword := 'HELP_MODULE';                                                                             
      ELSE                                                                                                    
        keyword := 'UNKNOWN';                                                                                 
      IFEND;                                                                                                  
      clp$make_keyword_value (keyword, work_area, fields [occ$kwd_module_kind].value);                        
    IFEND;                                                                                                    
                                                                                                              
                                                                                                              
{ Natural Language                                                                                            
                                                                                                              
    IF occ$kwd_natural_language IN selected_attributes THEN                                                   
      clp$make_name_value (natural_language, work_area, fields [occ$kwd_natural_language].value);             
    IFEND;                                                                                                    
                                                                                                              
{ Online Manual                                                                                               
                                                                                                              
    IF (occ$kwd_online_manual IN selected_attributes) AND (online_manual <> osc$null_name) THEN               
      clp$make_program_name_value (online_manual, work_area, fields [occ$kwd_online_manual].value);           
    IFEND;                                                                                                    
                                                                                                              
{ Status codes                                                                                                
                                                                                                              
    IF (occ$kwd_status_codes IN selected_attributes) AND message_module THEN                                  
      clp$make_range_value (work_area, fields [occ$kwd_status_codes].value);                                  
      clp$make_status_code_value (lowest_condition_code, work_area,                                           
            fields [occ$kwd_status_codes].value^.low_value);                                                  
      clp$make_status_code_value (highest_condition_code, work_area,                                          
            fields [occ$kwd_status_codes].value^.high_value);                                                 
    IFEND;                                                                                                    
                                                                                                              
  PROCEND build_message_module_attributes;                                                                    
?? OLDTITLE ??                                                                                                
?? NEWTITLE := 'build_program_attributes', EJECT ??                                                           
                                                                                                              
{ PURPOSE:                                                                                                    
{   build the program attributes.                                                                             
{                                                                                                             
{ GENERATED FIELDS:                                                                                           
{   abort_file: any of                                                                                        
{       file                                                                                                  
{       string                                                                                                
{     anyend                                                                                                  
{   arithmetic_loss_of_significance: boolean                                                                  
{   arithmetic_overflow: boolean                                                                              
{   debug_input: any of                                                                                       
{       file                                                                                                  
{       string                                                                                                
{     anyend                                                                                                  
{   debug_mode: boolean                                                                                       
{   debug_output: any of                                                                                      
{       file                                                                                                  
{       string                                                                                                
{     anyend                                                                                                  
{   divide_fault: boolean                                                                                     
{   exponent_overflow: boolean                                                                                
{   exponent_underflow: boolean                                                                               
{   fp_indefinite: boolean                                                                                    
{   fp_loss_of_significance: boolean                                                                          
{   invalid_bdp_data: boolean                                                                                 
{   libraries: list of any of                                                                                 
{       key osf$current_library, osf$task_services_library keyend                                             
{       file                                                                                                  
{       string                                                                                                
{     anyend                                                                                                  
{   load_map_options: any of                                                                                  
{       key all, none keyend                                                                                  
{       list of key                                                                                           
{         segment, block, cross_reference, entry_point                                                        
{       keyend                                                                                                
{     anyend                                                                                                  
{   modules: list of program_name                                                                             
{   object_files: list of any of                                                                              
{       file                                                                                                  
{       string                                                                                                
{     anyend                                                                                                  
{   preset_value: key                                                                                         
{       zero, alternate_ones, floating_point_indefinite, infinity                                             
{     keyend                                                                                                  
{   stack_size: integer                                                                                       
{   starting_procedure: program_name                                                                          
{   termination_error_level: key                                                                              
{       warning, error, fatal                                                                                 
{     keyend                                                                                                  
                                                                                                              
  PROCEDURE build_program_attributes                                                                          
    (    selected_attributes: oct$attribute_keyword_set;                                                      
         library_member_header: llt$library_member_header;                                                    
         changed_info: ^oct$changed_info;                                                                     
     VAR module_description: oct$module_description;                                                          
     VAR work_area: ^clt$work_area;                                                                           
     VAR fields: field_values;                                                                                
     VAR status: ost$status);                                                                                 
                                                                                                              
    VAR                                                                                                       
      conditions: ^pmt$enable_inhibit_conditions,                                                             
      i: integer,                                                                                             
      keyword: ost$name,                                                                                      
      l: integer,                                                                                             
      library_list: ^llt$object_library_list,                                                                 
      member: ^llt$program_description,                                                                       
      module_list: ^pmt$module_list,                                                                          
      object_file_list: ^llt$object_file_list,                                                                
      program_attributes: ^llt$program_attributes,                                                            
      strng: string (120),                                                                                    
      value: ^^clt$data_value;                                                                                
                                                                                                              
    VAR                                                                                                       
      condition_info: [STATIC, READ, ocs$literals] array [1 .. 8] of record                                   
        condition: pmt$system_condition,                                                                      
        field_index: integer,                                                                                 
      recend := [[pmc$arithmetic_overflow, occ$kwd_arithmetic_overflow],                                      
            [pmc$arithmetic_significance, occ$kwd_arithmetic_loss_of_sig],                                    
            [pmc$divide_fault, occ$kwd_divide_fault], [pmc$exponent_overflow, occ$kwd_exponent_overflow],     
            [pmc$exponent_underflow, occ$kwd_exponent_underflow], [pmc$fp_indefinite, occ$kwd_fp_indefinite], 
            [pmc$fp_significance_loss, occ$kwd_fp_loss_of_significance],                                      
            [pmc$invalid_bdp_data, occ$kwd_invalid_bdp_data]];                                                
                                                                                                              
    IF (selected_attributes * program_attributes_group) = $oct$attribute_keyword_set [] THEN                  
      RETURN;                                                                                                 
    IFEND;                                                                                                    
                                                                                                              
    member := #PTR (library_member_header.member, module_description.file^);                                  
    IF member = NIL THEN                                                                                      
      osp$set_status_abnormal ('OC', oce$e_premature_eof_in_module, library_member_header.name, status);      
      RETURN;                                                                                                 
    IFEND;                                                                                                    
                                                                                                              
    RESET member;                                                                                             
    NEXT program_attributes IN member;                                                                        
    IF program_attributes = NIL THEN                                                                          
      osp$set_status_abnormal ('OC', oce$e_premature_eof_in_module, library_member_header.name, status);      
      RETURN;                                                                                                 
    IFEND;                                                                                                    
                                                                                                              
{ Object file list.                                                                                           
                                                                                                              
    IF occ$kwd_object_files IN selected_attributes THEN                                                       
      IF (pmc$object_file_list_specified IN program_attributes^.contents) AND                                 
            (program_attributes^.number_of_object_files <> 0) THEN                                            
        NEXT object_file_list: [1 .. program_attributes^.number_of_object_files] IN member;                   
        IF object_file_list = NIL THEN                                                                        
          osp$set_status_abnormal ('OC', oce$e_premature_eof_in_module, library_member_header.name, status);  
          RETURN;                                                                                             
        IFEND;                                                                                                
        value := ^fields [occ$kwd_object_files].value;                                                        
        FOR i := 1 TO program_attributes^.number_of_object_files DO                                           
          clp$make_list_value (work_area, value^);                                                            
          ocp$make_file_value (object_file_list^ [i], work_area, value^^.element_value);                      
          value := ^value^^.link;                                                                             
        FOREND;                                                                                               
      ELSE                                                                                                    
        clp$make_unspecified_value (work_area, fields [occ$kwd_object_files].value);                          
      IFEND;                                                                                                  
    IFEND;                                                                                                    
                                                                                                              
{ Module list                                                                                                 
                                                                                                              
    IF occ$kwd_modules IN selected_attributes THEN                                                            
      IF (pmc$module_list_specified IN program_attributes^.contents) AND                                      
            (program_attributes^.number_of_modules <> 0) THEN                                                 
        NEXT module_list: [1 .. program_attributes^.number_of_modules] IN member;                             
        IF module_list = NIL THEN                                                                             
          osp$set_status_abnormal ('OC', oce$e_premature_eof_in_module, library_member_header.name, status);  
          RETURN;                                                                                             
        IFEND;                                                                                                
                                                                                                              
        value := ^fields [occ$kwd_modules].value;                                                             
        FOR i := 1 TO program_attributes^.number_of_modules DO                                                
          clp$make_list_value (work_area, value^);                                                            
          clp$make_program_name_value (module_list^ [i], work_area, value^^.element_value);                   
        FOREND;                                                                                               
      ELSE                                                                                                    
        clp$make_unspecified_value (work_area, fields [occ$kwd_modules].value);                               
      IFEND;                                                                                                  
    IFEND;                                                                                                    
                                                                                                              
{ Library list:                                                                                               
                                                                                                              
    IF occ$kwd_libraries IN selected_attributes THEN                                                          
      IF (pmc$library_list_specified IN program_attributes^.contents) AND                                     
            (program_attributes^.number_of_libraries <> 0) THEN                                               
        NEXT library_list: [1 .. program_attributes^.number_of_libraries] IN member;                          
        IF library_list = NIL THEN                                                                            
          osp$set_status_abnormal ('OC', oce$e_premature_eof_in_module, library_member_header.name, status);  
          RETURN;                                                                                             
        IFEND;                                                                                                
                                                                                                              
        value := ^fields [occ$kwd_libraries].value;                                                           
        FOR i := 1 TO program_attributes^.number_of_libraries DO                                              
          clp$make_list_value (work_area, value^);                                                            
          ocp$make_file_value (library_list^ [i], work_area, value^^.element_value);                          
          value := ^value^^.link;                                                                             
        FOREND;                                                                                               
      ELSE                                                                                                    
        clp$make_list_value (work_area, fields [occ$kwd_libraries].value);                                    
      IFEND;                                                                                                  
    IFEND;                                                                                                    
                                                                                                              
{ Abort File                                                                                                  
                                                                                                              
    IF occ$kwd_abort_file IN selected_attributes THEN                                                         
      IF pmc$abort_file_specified IN program_attributes^.contents THEN                                        
        ocp$make_file_value (program_attributes^.abort_file, work_area, fields [occ$kwd_abort_file].value);   
      ELSE                                                                                                    
        clp$make_unspecified_value (work_area, fields [occ$kwd_abort_file].value);                            
      IFEND;                                                                                                  
    IFEND;                                                                                                    
                                                                                                              
{ Conditions:                                                                                                 
                                                                                                              
    IF (pmc$condition_specified IN program_attributes^.contents) THEN                                         
      NEXT conditions IN member;                                                                              
      IF conditions = NIL THEN                                                                                
        osp$set_status_abnormal ('OC', oce$e_premature_eof_in_module, library_member_header.name, status);    
        RETURN;                                                                                               
      IFEND;                                                                                                  
                                                                                                              
      FOR i := 1 TO UPPERBOUND (condition_info) DO                                                            
        IF condition_info [i].field_index IN selected_attributes THEN                                         
          value := ^fields [condition_info [i].field_index].value;                                            
          IF condition_info [i].condition IN conditions^.enable_system_conditions THEN                        
            clp$make_boolean_value (TRUE, clc$on_off_boolean, work_area, value^);                             
          ELSEIF condition_info [i].condition IN conditions^.inhibit_system_conditions THEN                   
            clp$make_boolean_value (FALSE, clc$on_off_boolean, work_area, value^);                            
          ELSE                                                                                                
            clp$make_unspecified_value (work_area, value^);                                                   
          IFEND;                                                                                              
        IFEND;                                                                                                
      FOREND;                                                                                                 
    IFEND;                                                                                                    
                                                                                                              
                                                                                                              
{ Debug Input                                                                                                 
                                                                                                              
    IF occ$kwd_debug_input IN selected_attributes THEN                                                        
      IF pmc$debug_input_specified IN program_attributes^.contents THEN                                       
        ocp$make_file_value (program_attributes^.debug_input, work_area, fields [occ$kwd_debug_input].value); 
      ELSE                                                                                                    
        clp$make_unspecified_value (work_area, fields [occ$kwd_debug_input].value);                           
      IFEND;                                                                                                  
    IFEND;                                                                                                    
                                                                                                              
{ Debug Mode                                                                                                  
                                                                                                              
    IF occ$kwd_debug_mode IN selected_attributes THEN                                                         
      IF pmc$debug_mode_specified IN program_attributes^.contents THEN                                        
        clp$make_boolean_value (program_attributes^.debug_mode, clc$on_off_boolean, work_area,                
              fields [occ$kwd_debug_mode].value);                                                             
      ELSE                                                                                                    
        clp$make_unspecified_value (work_area, fields [occ$kwd_debug_mode].value);                            
      IFEND;                                                                                                  
    IFEND;                                                                                                    
                                                                                                              
{ Debug Output                                                                                                
                                                                                                              
    IF occ$kwd_debug_output IN selected_attributes THEN                                                       
      IF pmc$debug_output_specified IN program_attributes^.contents THEN                                      
        ocp$make_file_value (program_attributes^.debug_output, work_area, fields [occ$kwd_debug_output].      
              value);                                                                                         
      ELSE                                                                                                    
        clp$make_unspecified_value (work_area, fields [occ$kwd_debug_output].value);                          
      IFEND;                                                                                                  
    IFEND;                                                                                                    
                                                                                                              
{ Load map file.                                                                                              
                                                                                                              
    IF occ$kwd_load_map IN selected_attributes THEN                                                           
      IF pmc$load_map_file_specified IN program_attributes^.contents THEN                                     
        ocp$make_file_value (program_attributes^.load_map_file, work_area, fields [occ$kwd_load_map].value);  
      ELSE                                                                                                    
        clp$make_unspecified_value (work_area, fields [occ$kwd_load_map].value);                              
      IFEND;                                                                                                  
    IFEND;                                                                                                    
                                                                                                              
{ Load map options                                                                                            
                                                                                                              
    IF occ$kwd_load_map_options IN selected_attributes THEN                                                   
      IF pmc$load_map_options_specified IN program_attributes^.contents THEN                                  
        value := ^fields [occ$kwd_load_map_options].value;                                                    
        IF pmc$no_load_map IN program_attributes^.load_map_options THEN                                       
          clp$make_keyword_value ('NONE', work_area, value^);                                                 
        IFEND;                                                                                                
        IF pmc$segment_map IN program_attributes^.load_map_options THEN                                       
          clp$make_list_value (work_area, value^);                                                            
          clp$make_keyword_value ('SEGMENT', work_area, value^^.element_value);                               
          value := ^value^^.link;                                                                             
        IFEND;                                                                                                
        IF pmc$block_map IN program_attributes^.load_map_options THEN                                         
          clp$make_list_value (work_area, value^);                                                            
          clp$make_keyword_value ('BLOCK', work_area, value^^.element_value);                                 
          value := ^value^^.link;                                                                             
        IFEND;                                                                                                
        IF pmc$entry_point_map IN program_attributes^.load_map_options THEN                                   
          clp$make_list_value (work_area, value^);                                                            
          clp$make_keyword_value ('ENTRY_POINT', work_area, value^^.element_value);                           
          value := ^value^^.link;                                                                             
        IFEND;                                                                                                
        IF pmc$entry_point_xref IN program_attributes^.load_map_options THEN                                  
          clp$make_list_value (work_area, value^);                                                            
          clp$make_keyword_value ('XREF', work_area, value^^.element_value);                                  
          value := ^value^^.link;                                                                             
        IFEND;                                                                                                
      ELSE                                                                                                    
        clp$make_unspecified_value (work_area, fields [occ$kwd_load_map_options].value);                      
      IFEND;                                                                                                  
    IFEND;                                                                                                    
                                                                                                              
{ Preset value                                                                                                
                                                                                                              
    IF occ$kwd_preset_value IN selected_attributes THEN                                                       
      IF pmc$preset_specified IN program_attributes^.contents THEN                                            
        CASE program_attributes^.preset OF                                                                    
        = pmc$initialize_to_zero =                                                                            
          keyword := 'ZERO';                                                                                  
        = pmc$initialize_to_alt_ones =                                                                        
          keyword := 'ALTERNATE_ONES';                                                                        
        = pmc$initialize_to_indefinite =                                                                      
          keyword := 'FLOATING_POINT_INDEFINITE';                                                             
        = pmc$initialize_to_infinity =                                                                        
          keyword := 'INFINITY';                                                                              
        ELSE                                                                                                  
          keyword := 'UNKNOWN';                                                                               
        CASEND;                                                                                               
        clp$make_keyword_value (keyword, work_area, fields [occ$kwd_preset_value].value);                     
      ELSE                                                                                                    
        clp$make_unspecified_value (work_area, fields [occ$kwd_preset_value].value);                          
      IFEND;                                                                                                  
    IFEND;                                                                                                    
                                                                                                              
{ Stack_size                                                                                                  
                                                                                                              
    IF occ$kwd_stack_size IN selected_attributes THEN                                                         
      IF pmc$max_stack_size_specified IN program_attributes^.contents THEN                                    
        clp$make_integer_value (program_attributes^.maximum_stack_size, 10, FALSE, work_area,                 
              fields [occ$kwd_stack_size].value);                                                             
      ELSE                                                                                                    
        clp$make_unspecified_value (work_area, fields [occ$kwd_stack_size].value);                            
      IFEND;                                                                                                  
    IFEND;                                                                                                    
                                                                                                              
{ Starting procedure                                                                                          
                                                                                                              
    IF occ$kwd_starting_procedure IN selected_attributes THEN                                                 
      IF pmc$starting_proc_specified IN program_attributes^.contents THEN                                     
        clp$make_program_name_value (program_attributes^.starting_procedure, work_area,                       
              fields [occ$kwd_starting_procedure].value);                                                     
      ELSE                                                                                                    
        clp$make_unspecified_value (work_area, fields [occ$kwd_starting_procedure].value);                    
      IFEND;                                                                                                  
    IFEND;                                                                                                    
                                                                                                              
{ Termination Error Level                                                                                     
                                                                                                              
    IF occ$kwd_termination_error_level IN selected_attributes THEN                                            
      IF pmc$term_error_level_specified IN program_attributes^.contents THEN                                  
        CASE program_attributes^.termination_error_level OF                                                   
        = pmc$warning_load_errors =                                                                           
          keyword := 'WARNING';                                                                               
        = pmc$error_load_errors =                                                                             
          keyword := 'ERROR';                                                                                 
        = pmc$fatal_load_errors =                                                                             
          keyword := 'FATAL';                                                                                 
        ELSE                                                                                                  
          keyword := 'UNKNOWN';                                                                               
        CASEND;                                                                                               
        clp$make_keyword_value (keyword, work_area, fields [occ$kwd_termination_error_level].value);          
      ELSE                                                                                                    
        clp$make_unspecified_value (work_area, fields [occ$kwd_termination_error_level].value);               
      IFEND;                                                                                                  
    IFEND;                                                                                                    
                                                                                                              
  PROCEND build_program_attributes;                                                                           
?? OLDTITLE ??                                                                                                
?? NEWTITLE := 'build_standard_header', EJECT ??                                                              
                                                                                                              
{ PURPOSE:                                                                                                    
{   Build a header of type llt$library_member_header for the module.                                          
                                                                                                              
  PROCEDURE build_standard_header                                                                             
    (    changed_info: ^oct$changed_info;                                                                     
     VAR module_description: oct$module_description;                                                          
     VAR module_kind: text_module_kind;                                                                       
     VAR application_identifier: ost$name;                                                                    
     VAR header: llt$library_member_header;                                                                   
     VAR status: ost$status);                                                                                 
                                                                                                              
    VAR                                                                                                       
      ignore: boolean,                                                                                        
      module_header: oct$header;                                                                              
                                                                                                              
                                                                                                              
    module_header.application_member_header.application_identifier.name := '';                                
                                                                                                              
    ocp$obtain_header (module_description, changed_info, module_header, status);                              
    IF NOT status.normal THEN                                                                                 
      RETURN;                                                                                                 
    IFEND;                                                                                                    
                                                                                                              
    CASE module_description.kind OF                                                                           
    = occ$cpu_object_module, occ$ppu_object_module, occ$load_module, occ$bound_module =                       
      header.name := module_header.identification.name;                                                       
      header.time_created := module_header.identification.time_created;                                       
      header.date_created := module_header.identification.date_created;                                       
      header.generator_id := module_header.identification.generator_id;                                       
      header.generator_name_vers := module_header.identification.generator_name_vers;                         
      header.commentary := module_header.identification.commentary;                                           
      application_identifier := module_header.application_identifier.name;                                    
      module_kind.valid := TRUE;                                                                              
      module_kind.text_kind := module_header.identification.kind;                                             
    ELSE                                                                                                      
      header := module_header.library_member_header;                                                          
      application_identifier := module_header.application_member_header.application_identifier.name;          
      module_kind.valid := FALSE;                                                                             
    CASEND;                                                                                                   
                                                                                                              
  PROCEND build_standard_header;                                                                              
?? OLDTITLE ??                                                                                                
?? NEWTITLE := 'make_alias_list', EJECT ??                                                                    
                                                                                                              
{ PURPOSE:                                                                                                    
{   Build list of aliases.                                                                                    
                                                                                                              
{ GENERATED VALUE:                                                                                            
{     aliases: list of program_name                                                                           
                                                                                                              
  PROCEDURE make_alias_list                                                                                   
    (    changed_info: ^oct$changed_info;                                                                     
     VAR module_description: oct$module_description;                                                          
     VAR work_area: ^clt$work_area;                                                                           
     VAR field: clt$field_value;                                                                              
     VAR status: ost$status);                                                                                 
                                                                                                              
                                                                                                              
    VAR                                                                                                       
      aliases: oct$external_declaration_list,                                                                 
      ignore: oct$external_declaration_list,                                                                  
      next_alias: ^oct$external_declaration_list,                                                             
      starting_procedure: pmt$program_name,                                                                   
      value: ^^clt$data_value;                                                                                
                                                                                                              
                                                                                                              
    ocp$obtain_xdcl_list (changed_info, occ$no_retain, {obtain_deferred_entry_points=} FALSE,                 
          module_description, aliases, starting_procedure, ignore, status);                                   
    IF NOT status.normal THEN                                                                                 
      RETURN;                                                                                                 
    IFEND;                                                                                                    
                                                                                                              
    next_alias := aliases.link;                                                                               
                                                                                                              
    IF next_alias <> NIL THEN                                                                                 
      value := ^field.value;                                                                                  
                                                                                                              
      REPEAT                                                                                                  
        IF next_alias^.name <> osc$null_name THEN                                                             
          clp$make_list_value (work_area, value^);                                                            
          clp$make_program_name_value (next_alias^.name, work_area, value^^.element_value);                   
          value := ^value^^.link;                                                                             
        IFEND;                                                                                                
        next_alias := next_alias^.link;                                                                       
      UNTIL next_alias = NIL;                                                                                 
                                                                                                              
    ELSE                                                                                                      
      clp$make_list_value (work_area, field.value);                                                           
    IFEND;                                                                                                    
                                                                                                              
                                                                                                              
  PROCEND make_alias_list;                                                                                    
?? OLDTITLE ??                                                                                                
?? NEWTITLE := 'make_command_attributes', EJECT ??                                                            
                                                                                                              
{ PURPOSE:                                                                                                    
{   Build fields specific to command_descriptions and function_descriptions.                                  
{                                                                                                             
{ GENERATED FIELDS:                                                                                           
{   libraries: list of file                                                                                   
{   starting_procedure: program_name                                                                          
{   system_command_name: name                                                                                 
                                                                                                              
  PROCEDURE make_command_attributes                                                                           
    (    selected_attributes: oct$attribute_keyword_set;                                                      
         changed_info: ^oct$changed_info;                                                                     
         library_member_header: llt$library_member_header;                                                    
     VAR module_description: oct$module_description;                                                          
     VAR work_area: ^clt$work_area;                                                                           
     VAR fields: field_values;                                                                                
     VAR status: ost$status);                                                                                 
                                                                                                              
    VAR                                                                                                       
      aliases: ^pmt$module_list,                                                                              
      command_attributes: ^llt$command_desc_contents,                                                         
      deferred_xdcl_list: oct$external_declaration_list,                                                      
      library_path: ^fst$file_reference,                                                                      
      member: ^llt$command_description,                                                                       
      starting_procedure: pmt$program_name,                                                                   
      xdcl_list: oct$external_declaration_list;                                                               
                                                                                                              
                                                                                                              
    member := #PTR (library_member_header.member, module_description.file^);                                  
    IF member = NIL THEN                                                                                      
      osp$set_status_abnormal ('OC', oce$e_premature_eof_in_module, library_member_header.name, status);      
      RETURN;                                                                                                 
    IFEND;                                                                                                    
                                                                                                              
    RESET member;                                                                                             
    NEXT command_attributes IN member;                                                                        
    IF command_attributes = NIL THEN                                                                          
      osp$set_status_abnormal ('OC', oce$e_premature_eof_in_module, library_member_header.name, status);      
      RETURN;                                                                                                 
    IFEND;                                                                                                    
                                                                                                              
    IF command_attributes^.system_command THEN                                                                
                                                                                                              
{ System command name                                                                                         
                                                                                                              
      IF occ$kwd_system_command_name IN selected_attributes THEN                                              
        clp$make_name_value (command_attributes^.system_command_name, work_area,                              
              fields [occ$kwd_system_command_name].value);                                                    
      IFEND;                                                                                                  
                                                                                                              
    ELSE                                                                                                      
                                                                                                              
{ Library Path                                                                                                
                                                                                                              
      IF occ$kwd_libraries IN selected_attributes THEN                                                        
        IF command_attributes^.library_path_size > 0 THEN                                                     
          NEXT library_path: [command_attributes^.library_path_size] IN member;                               
          IF library_path = NIL THEN                                                                          
            osp$set_status_abnormal ('OC', oce$e_premature_eof_in_module, library_member_header.name, status);
            RETURN;                                                                                           
          IFEND;                                                                                              
                                                                                                              
          clp$make_list_value (work_area, fields [occ$kwd_libraries].value);                                  
          ocp$make_file_value (library_path^, work_area, fields [occ$kwd_libraries].value^.element_value);    
        IFEND;                                                                                                
      IFEND;                                                                                                  
                                                                                                              
{ Starting procedure                                                                                          
                                                                                                              
      IF occ$kwd_starting_procedure IN selected_attributes THEN                                               
                                                                                                              
        IF command_attributes^.starting_procedure <> osc$null_name THEN                                       
          clp$make_program_name_value (command_attributes^.starting_procedure, work_area,                     
                fields [occ$kwd_starting_procedure].value);                                                   
        IFEND;                                                                                                
      IFEND;                                                                                                  
                                                                                                              
    IFEND;                                                                                                    
                                                                                                              
  PROCEND make_command_attributes;                                                                            
?? OLDTITLE ??                                                                                                
?? NEWTITLE := 'make_component_list', EJECT ??                                                                
                                                                                                              
{ PURPOSE:                                                                                                    
{   Build a list of record of component information.                                                          
{                                                                                                             
{ GENERATED VALUE:                                                                                            
{   components: list of record                                                                                
{     name: name                                                                                              
{     creation_date_time: date_time                                                                           
{     generator: keyword                                                                                      
{     generator_version: string                                                                               
{     comment: string                                                                                         
{   recend                                                                                                    
                                                                                                              
  PROCEDURE make_component_list                                                                               
    (    component: ^llt$component_information;                                                               
     VAR work_area: ^clt$work_area;                                                                           
     VAR field: clt$field_value);                                                                             
                                                                                                              
    CONST                                                                                                     
      p$name = 1,                                                                                             
      p$creation_date_time = 2,                                                                               
      p$generator = 3,                                                                                        
      p$generator_version = 4,                                                                                
      p$comment = 5;                                                                                          
                                                                                                              
                                                                                                              
    VAR                                                                                                       
      fields: ^field_values,                                                                                  
      ignore: boolean,                                                                                        
      i: integer,                                                                                             
      value: ^^clt$data_value;                                                                                
                                                                                                              
                                                                                                              
    IF component = NIL THEN                                                                                   
      clp$make_list_value (work_area, field.value);                                                           
      RETURN;                                                                                                 
    IFEND;                                                                                                    
                                                                                                              
    value := ^field.value;                                                                                    
                                                                                                              
    FOR i := 1 TO UPPERBOUND (component^) DO                                                                  
                                                                                                              
      clp$make_list_value (work_area, value^);                                                                
      clp$make_record_value (5, work_area, value^^.element_value);                                            
      fields := value^^.element_value^.field_values;                                                          
      value := ^value^^.link;                                                                                 
                                                                                                              
{component:                                                                                                   
                                                                                                              
      fields^ [p$name].name := 'NAME';                                                                        
      clp$make_program_name_value (component^ [i].name, work_area, fields^ [p$name].value);                   
                                                                                                              
{ Created:                                                                                                    
                                                                                                              
      fields^ [p$creation_date_time].name := 'CREATION_DATE_TIME';                                            
      ocp$make_date_time_value (component^ [i].date_created, component^ [i].                                  
            time_created, work_area, fields^ [p$creation_date_time].value);                                   
                                                                                                              
{ Generator:                                                                                                  
                                                                                                              
      fields^ [p$generator].name := 'GENERATOR';                                                              
      ocp$make_module_generator_value (component^ [i].generator_id, work_area, fields^ [p$generator].value);  
                                                                                                              
{ Generator name version                                                                                      
                                                                                                              
      fields^ [p$generator_version].name := 'GENERATOR_VERSION';                                              
      clp$make_string_value (component^ [i].generator_name_vers                                               
            (1, clp$trimmed_string_size (component^ [i].generator_name_vers)),                                
            work_area, fields^ [p$generator_version].value);                                                  
                                                                                                              
{ Comment                                                                                                     
                                                                                                              
      fields^ [p$comment].name := 'COMMENT';                                                                  
      clp$make_string_value (component^ [i].commentary (1, clp$trimmed_string_size (component^ [i].           
            commentary)), work_area, fields^ [p$comment].value);                                              
    FOREND;                                                                                                   
                                                                                                              
  PROCEND make_component_list;                                                                                
?? OLDTITLE ??                                                                                                
?? NEWTITLE := 'make_entry_points_list', EJECT ??                                                             
                                                                                                              
{ PURPOSE:                                                                                                    
{   Build a list of entry_points.                                                                             
{                                                                                                             
{ GENERATED VALUE:                                                                                            
{   entry_points: list of record                                                                              
{     name: program_name                                                                                      
{     deferred: boolean                                                                                       
{     gated: boolean                                                                                          
{     retained: boolean                                                                                       
{   recend                                                                                                    
                                                                                                              
  PROCEDURE make_entry_points_list                                                                            
    (    xdcl_list: oct$external_declaration_list;                                                            
         deferred_xdcl_list: oct$external_declaration_list;                                                   
     VAR work_area: ^clt$work_area;                                                                           
     VAR field: clt$field_value);                                                                             
                                                                                                              
                                                                                                              
    CONST                                                                                                     
      p$name = 1,                                                                                             
      p$deferred = 2,                                                                                         
      p$gated = 3,                                                                                            
      p$retained = 4;                                                                                         
                                                                                                              
    VAR                                                                                                       
      entry: ^clt$data_value,                                                                                 
      entry_kind: (normal, deferred),                                                                         
      value: ^^clt$data_value,                                                                                
      x_dcl: ^oct$external_declaration_list;                                                                  
                                                                                                              
                                                                                                              
    value := ^field.value;                                                                                    
                                                                                                              
    FOR entry_kind := normal TO deferred DO                                                                   
                                                                                                              
      IF entry_kind = normal THEN                                                                             
        x_dcl := xdcl_list.link;                                                                              
      ELSE                                                                                                    
        x_dcl := deferred_xdcl_list.link;                                                                     
      IFEND;                                                                                                  
                                                                                                              
      WHILE x_dcl <> NIL DO                                                                                   
        IF x_dcl^.name <> osc$null_name THEN                                                                  
          clp$make_list_value (work_area, value^);                                                            
          clp$make_record_value (4, work_area, entry);                                                        
          value^^.element_value := entry;                                                                     
                                                                                                              
          entry^.field_values^ [p$name].name := 'NAME';                                                       
          clp$make_program_name_value (x_dcl^.name, work_area, entry^.field_values^ [p$name].value);          
                                                                                                              
          entry^.field_values^ [p$deferred].name := 'DEFERRED';                                               
          clp$make_boolean_value ((entry_kind = deferred), clc$true_false_boolean, work_area,                 
                entry^.field_values^ [p$deferred].value);                                                     
                                                                                                              
          entry^.field_values^ [p$gated].name := 'GATED';                                                     
          clp$make_boolean_value ((llc$gated_entry_point IN x_dcl^.attributes), clc$true_false_boolean,       
                work_area, entry^.field_values^ [p$gated].value);                                             
                                                                                                              
          entry^.field_values^ [p$retained].name := 'RETAINED';                                               
          clp$make_boolean_value ((llc$retain_entry_point IN x_dcl^.attributes), clc$true_false_boolean,      
                work_area, entry^.field_values^ [p$retained].value);                                          
          value := ^value^^.link;                                                                             
        IFEND;                                                                                                
        x_dcl := x_dcl^.link;                                                                                 
      WHILEND;                                                                                                
    FOREND;                                                                                                   
    value^ := NIL;                                                                                            
                                                                                                              
    IF field.value = NIL THEN                                                                                 
      clp$make_list_value (work_area, field.value);                                                           
    IFEND;                                                                                                    
                                                                                                              
                                                                                                              
  PROCEND make_entry_points_list;                                                                             
?? OLDTITLE ??                                                                                                
?? NEWTITLE := 'make_executable_attributes', EJECT ??                                                         
                                                                                                              
{ PURPOSE:                                                                                                    
{   Make the attributes of executable modules.                                                                
{                                                                                                             
{ GENERATED FIELDS:                                                                                           
{   components: list of component records                                                                     
{   entry_points: list of entry point records                                                                 
{   references: list of program_name                                                                          
                                                                                                              
  PROCEDURE make_executable_attributes                                                                        
    (    selected_attributes: oct$attribute_keyword_set;                                                      
         changed_info: ^oct$changed_info;                                                                     
     VAR module_description: oct$module_description;                                                          
     VAR work_area: ^clt$work_area;                                                                           
     VAR fields: field_values;                                                                                
     VAR status: ost$status);                                                                                 
                                                                                                              
    VAR                                                                                                       
      alias_list: oct$external_declaration_list,                                                              
      component_info: ^llt$component_information,                                                             
      deferred_xdcl_list: oct$external_declaration_list,                                                      
      starting_procedure: pmt$program_name,                                                                   
      xdcl_list: oct$external_declaration_list,                                                               
      xref_list: oct$external_reference_list;                                                                 
                                                                                                              
                                                                                                              
{ Components.                                                                                                 
                                                                                                              
    IF occ$kwd_components IN selected_attributes THEN                                                         
      ocp$obtain_component_info (module_description, component_info, status);                                 
      IF NOT status.normal THEN                                                                               
        RETURN;                                                                                               
      IFEND;                                                                                                  
                                                                                                              
      make_component_list (component_info, work_area, fields [occ$kwd_components]);                           
    IFEND;                                                                                                    
                                                                                                              
{ Entry points.                                                                                               
                                                                                                              
    IF occ$kwd_entry_points IN selected_attributes THEN                                                       
      ocp$obtain_xdcl_list (changed_info, occ$no_retain, {obtain_deferred_entry_points=} TRUE,                
            module_description, xdcl_list, starting_procedure, deferred_xdcl_list, status);                   
      IF NOT status.normal THEN                                                                               
        RETURN;                                                                                               
      IFEND;                                                                                                  
                                                                                                              
      make_entry_points_list (xdcl_list, deferred_xdcl_list, work_area, fields [occ$kwd_entry_points]);       
    IFEND;                                                                                                    
                                                                                                              
{ References.                                                                                                 
                                                                                                              
    IF occ$kwd_references IN selected_attributes THEN                                                         
      ocp$obtain_xref_list (module_description, xref_list, occ$no_retain, status);                            
      IF NOT status.normal THEN                                                                               
        RETURN;                                                                                               
      IFEND;                                                                                                  
                                                                                                              
      make_references_list (xref_list, work_area, fields [occ$kwd_references]);                               
    IFEND;                                                                                                    
                                                                                                              
                                                                                                              
  PROCEND make_executable_attributes;                                                                         
?? OLDTITLE ??                                                                                                
?? NEWTITLE := 'make_function_attributes', EJECT ??                                                           
                                                                                                              
{ PURPOSE:                                                                                                    
{   Build fields specific to command_descriptions and function_descriptions.                                  
{                                                                                                             
{ GENERATED FIELDS:                                                                                           
{   libraries: list of file                                                                                   
{   starting_procedure: program_name                                                                          
{   system_command_name: name                                                                                 
                                                                                                              
  PROCEDURE make_function_attributes                                                                          
    (    selected_attributes: oct$attribute_keyword_set;                                                      
         changed_info: ^oct$changed_info;                                                                     
         library_member_header: llt$library_member_header;                                                    
     VAR module_description: oct$module_description;                                                          
     VAR work_area: ^clt$work_area;                                                                           
     VAR fields: field_values;                                                                                
     VAR status: ost$status);                                                                                 
                                                                                                              
    VAR                                                                                                       
      aliases: ^pmt$module_list,                                                                              
      function_attributes: ^llt$function_desc_contents,                                                       
      deferred_xdcl_list: oct$external_declaration_list,                                                      
      library_path: ^fst$file_reference,                                                                      
      member: ^llt$command_description,                                                                       
      starting_procedure: pmt$program_name,                                                                   
      xdcl_list: oct$external_declaration_list;                                                               
                                                                                                              
                                                                                                              
    member := #PTR (library_member_header.member, module_description.file^);                                  
    IF member = NIL THEN                                                                                      
      osp$set_status_abnormal ('OC', oce$e_premature_eof_in_module, library_member_header.name, status);      
      RETURN;                                                                                                 
    IFEND;                                                                                                    
                                                                                                              
    RESET member;                                                                                             
    NEXT function_attributes IN member;                                                                       
    IF function_attributes = NIL THEN                                                                         
      osp$set_status_abnormal ('OC', oce$e_premature_eof_in_module, library_member_header.name, status);      
      RETURN;                                                                                                 
    IFEND;                                                                                                    
                                                                                                              
                                                                                                              
{ Library Path                                                                                                
                                                                                                              
    IF occ$kwd_libraries IN selected_attributes THEN                                                          
      IF function_attributes^.library_path_size > 0 THEN                                                      
        NEXT library_path: [function_attributes^.library_path_size] IN member;                                
        IF library_path = NIL THEN                                                                            
          osp$set_status_abnormal ('OC', oce$e_premature_eof_in_module, library_member_header.name, status);  
          RETURN;                                                                                             
        IFEND;                                                                                                
                                                                                                              
        clp$make_list_value (work_area, fields [occ$kwd_libraries].value);                                    
        ocp$make_file_value (library_path^, work_area, fields [occ$kwd_libraries].value^.element_value);      
      IFEND;                                                                                                  
    IFEND;                                                                                                    
                                                                                                              
{ Starting procedure                                                                                          
                                                                                                              
    IF occ$kwd_starting_procedure IN selected_attributes THEN                                                 
                                                                                                              
      IF function_attributes^.starting_procedure <> osc$null_name THEN                                        
        clp$make_program_name_value (function_attributes^.starting_procedure, work_area,                      
              fields [occ$kwd_starting_procedure].value);                                                     
      IFEND;                                                                                                  
    IFEND;                                                                                                    
                                                                                                              
  PROCEND make_function_attributes;                                                                           
?? OLDTITLE ??                                                                                                
?? NEWTITLE := 'make_header_fields', EJECT ??                                                                 
                                                                                                              
{ PURPOSE:                                                                                                    
{   Make the header fields.                                                                                   
{                                                                                                             
{ GENERATED FIELDS:                                                                                           
{   name: program_name                                                                                        
{   application_identifier: name                                                                              
{   availability: key                                                                                         
{     normal_usage, advanced_usage, hidden                                                                    
{   keyend                                                                                                    
{   comment: string                                                                                           
{   creation_date_time: date_time                                                                             
{   generator: module generator keyword                                                                       
{   generator_version: string                                                                                 
{   log_option: key                                                                                           
{     automatic, manual                                                                                       
{   keyend                                                                                                    
{   scope: key                                                                                                
{     xdcl, gate, local                                                                                       
{   keyend                                                                                                    
{   text_kind: key                                                                                            
{     mi_virtual_state, vector_virtual_state,                                                                 
{     motorola_68000, motorola_68000_absolute,                                                                
{     p_code, iou                                                                                             
{   keyend                                                                                                    
                                                                                                              
  PROCEDURE make_header_fields                                                                                
    (    selected_attributes: oct$attribute_keyword_set;                                                      
         application_identifier: ost$name;                                                                    
         header: llt$library_member_header;                                                                   
         module_kind: text_module_kind;                                                                       
     VAR work_area: ^clt$work_area;                                                                           
     VAR fields: field_values;                                                                                
     VAR status: ost$status);                                                                                 
                                                                                                              
    VAR                                                                                                       
      keyword: ost$name;                                                                                      
                                                                                                              
                                                                                                              
{ Name                                                                                                        
                                                                                                              
    IF occ$kwd_name IN selected_attributes THEN                                                               
      clp$make_program_name_value (header.name, work_area, fields [occ$kwd_name].value);                      
    IFEND;                                                                                                    
                                                                                                              
{ Application identifier                                                                                      
                                                                                                              
    IF occ$kwd_application_identifier IN selected_attributes THEN                                             
      IF application_identifier <> osc$null_name THEN                                                         
        clp$make_name_value (application_identifier, work_area, fields [occ$kwd_application_identifier].      
              value);                                                                                         
      IFEND;                                                                                                  
    IFEND;                                                                                                    
                                                                                                              
{ Availability                                                                                                
                                                                                                              
    IF occ$kwd_availability IN selected_attributes THEN                                                       
      CASE header.command_function_availability OF                                                            
      = clc$normal_usage_entry =                                                                              
        keyword := 'NORMAL_USAGE';                                                                            
      = clc$advanced_usage_entry =                                                                            
        keyword := 'ADVANCED_USAGE';                                                                          
      = clc$hidden_entry =                                                                                    
        keyword := 'HIDDEN';                                                                                  
      ELSE                                                                                                    
        keyword := 'UNKNOWN';                                                                                 
      CASEND;                                                                                                 
      clp$make_keyword_value (keyword, work_area, fields [occ$kwd_availability].value);                       
    IFEND;                                                                                                    
                                                                                                              
{ Comment                                                                                                     
                                                                                                              
    IF occ$kwd_comment IN selected_attributes THEN                                                            
      clp$make_string_value (header.commentary (1, clp$trimmed_string_size (header.commentary)),              
            work_area, fields [occ$kwd_comment].value);                                                       
    IFEND;                                                                                                    
                                                                                                              
{ Creation date time                                                                                          
                                                                                                              
    IF occ$kwd_creation_date_time IN selected_attributes THEN                                                 
      ocp$make_date_time_value (header.date_created, header.time_created, work_area,                          
            fields [occ$kwd_creation_date_time].value);                                                       
    IFEND;                                                                                                    
                                                                                                              
{ Library Generator                                                                                           
                                                                                                              
    IF occ$kwd_generator IN selected_attributes THEN                                                          
      ocp$make_module_generator_value (header.generator_id, work_area, fields [occ$kwd_generator].value);     
    IFEND;                                                                                                    
                                                                                                              
{ Library Generator version                                                                                   
                                                                                                              
    IF occ$kwd_generator_version IN selected_attributes THEN                                                  
      clp$make_string_value (header.generator_name_vers (1,                                                   
            clp$trimmed_string_size (header.generator_name_vers)),                                            
            work_area, fields [occ$kwd_generator_version].value);                                             
    IFEND;                                                                                                    
                                                                                                              
{ Log Option                                                                                                  
                                                                                                              
    IF occ$kwd_log_option IN selected_attributes THEN                                                         
      CASE header.command_log_option OF                                                                       
      = clc$automatically_log =                                                                               
        keyword := 'AUTOMATIC';                                                                               
      = clc$manually_log =                                                                                    
        keyword := 'MANUAL';                                                                                  
      ELSE                                                                                                    
        keyword := 'UNKNOWN';                                                                                 
      CASEND;                                                                                                 
      clp$make_keyword_value (keyword, work_area, fields [occ$kwd_log_option].value);                         
    IFEND;                                                                                                    
                                                                                                              
{ Scope                                                                                                       
                                                                                                              
    IF occ$kwd_scope IN selected_attributes THEN                                                              
      CASE header.command_function_kind OF                                                                    
      = llc$entry_point =                                                                                     
        keyword := 'XDCL';                                                                                    
      = llc$gate =                                                                                            
        keyword := 'GATE';                                                                                    
      = llc$local_to_library =                                                                                
        keyword := 'LOCAL';                                                                                   
      ELSE                                                                                                    
        keyword := 'UNKNOWN';                                                                                 
      CASEND;                                                                                                 
      clp$make_keyword_value (keyword, work_area, fields [occ$kwd_scope].value);                              
    IFEND;                                                                                                    
                                                                                                              
{ Text kind                                                                                                   
                                                                                                              
    IF (occ$kwd_text_kind IN selected_attributes) AND module_kind.valid THEN                                  
      ocp$make_module_kind_value (module_kind.text_kind, work_area, fields [occ$kwd_text_kind].value);        
    IFEND;                                                                                                    
                                                                                                              
  PROCEND make_header_fields;                                                                                 
?? OLDTITLE ??                                                                                                
?? NEWTITLE := 'make_library_list', EJECT ??                                                                  
                                                                                                              
{ PURPOSE:                                                                                                    
{   Build a list of librarys.                                                                                 
{                                                                                                             
{ GENERATED VALUE                                                                                             
{   libraries: list of file                                                                                   
                                                                                                              
  PROCEDURE make_library_list                                                                                 
    (    library_list: oct$name_list;                                                                         
     VAR work_area: ^clt$work_area;                                                                           
     VAR field: clt$field_value);                                                                             
                                                                                                              
                                                                                                              
    VAR                                                                                                       
      value: ^^clt$data_value,                                                                                
      library: ^oct$name_list;                                                                                
                                                                                                              
                                                                                                              
    field.name := 'LIBRARIES';                                                                                
    library := library_list.link;                                                                             
                                                                                                              
    value := ^field.value;                                                                                    
    IF library <> NIL THEN                                                                                    
                                                                                                              
      REPEAT                                                                                                  
        clp$make_list_value (work_area, value^);                                                              
        clp$make_name_value (library^.name, work_area, value^^.element_value);                                
        library := library^.link;                                                                             
        value := ^value^^.link;                                                                               
      UNTIL library = NIL;                                                                                    
                                                                                                              
    ELSE                                                                                                      
      clp$make_list_value (work_area, field.value);                                                           
    IFEND;                                                                                                    
                                                                                                              
                                                                                                              
  PROCEND make_library_list;                                                                                  
?? OLDTITLE ??                                                                                                
?? NEWTITLE := 'make_other_exec_attributes', EJECT ??                                                         
                                                                                                              
{ PURPOSE:                                                                                                    
{   Make those fields common to most executable modules.                                                      
{                                                                                                             
{ GENERATED FIELDS:                                                                                           
{   libraries: list of name                                                                                   
{   starting_procedure: program_name                                                                          
                                                                                                              
  PROCEDURE make_other_exec_attributes                                                                        
    (    selected_attributes: oct$attribute_keyword_set;                                                      
         changed_info: ^oct$changed_info;                                                                     
     VAR module_description: oct$module_description;                                                          
     VAR work_area: ^clt$work_area;                                                                           
     VAR fields: field_values;                                                                                
     VAR status: ost$status);                                                                                 
                                                                                                              
    VAR                                                                                                       
      deferred_xdcl_list: oct$external_declaration_list,                                                      
      library_list: oct$name_list,                                                                            
      starting_procedure: pmt$program_name,                                                                   
      xdcl_list: oct$external_declaration_list;                                                               
                                                                                                              
{ Libraries                                                                                                   
                                                                                                              
    IF occ$kwd_libraries IN selected_attributes THEN                                                          
      ocp$obtain_library_list (module_description, changed_info, library_list, occ$no_retain, status);        
      IF NOT status.normal THEN                                                                               
        RETURN;                                                                                               
      IFEND;                                                                                                  
                                                                                                              
      make_library_list (library_list, work_area, fields [occ$kwd_libraries]);                                
    IFEND;                                                                                                    
                                                                                                              
{ Starting procedure                                                                                          
                                                                                                              
    IF occ$kwd_starting_procedure IN selected_attributes THEN                                                 
      ocp$obtain_xdcl_list (changed_info, occ$no_retain, {obtain_deferred_entry_points=} FALSE,               
            module_description, xdcl_list, starting_procedure, deferred_xdcl_list, status);                   
      IF NOT status.normal THEN                                                                               
        RETURN;                                                                                               
      IFEND;                                                                                                  
                                                                                                              
      IF starting_procedure <> osc$null_name THEN                                                             
        clp$make_program_name_value (starting_procedure, work_area, fields [occ$kwd_starting_procedure].      
              value);                                                                                         
      IFEND;                                                                                                  
    IFEND;                                                                                                    
  PROCEND make_other_exec_attributes;                                                                         
?? OLDTITLE ??                                                                                                
?? NEWTITLE := 'make_references_list', EJECT ??                                                               
                                                                                                              
{ PURPOSE:                                                                                                    
{   Build a list of xrefs.                                                                                    
{                                                                                                             
{ GENERATED VALUE:                                                                                            
{   references: list of program_name                                                                          
                                                                                                              
  PROCEDURE make_references_list                                                                              
    (    xref_list: oct$external_reference_list;                                                              
     VAR work_area: ^clt$work_area;                                                                           
     VAR field: clt$field_value);                                                                             
                                                                                                              
                                                                                                              
    VAR                                                                                                       
      value: ^^clt$data_value,                                                                                
      x_ref: ^oct$external_reference_list;                                                                    
                                                                                                              
    x_ref := xref_list.link;                                                                                  
                                                                                                              
    IF x_ref <> NIL THEN                                                                                      
      value := ^field.value;                                                                                  
                                                                                                              
      REPEAT                                                                                                  
        clp$make_list_value (work_area, value^);                                                              
        clp$make_program_name_value (x_ref^.name, work_area, value^^.element_value);                          
        value := ^value^^.link;                                                                               
        x_ref := x_ref^.link;                                                                                 
      UNTIL x_ref = NIL;                                                                                      
                                                                                                              
    ELSE                                                                                                      
      clp$make_list_value (work_area, field.value);                                                           
    IFEND;                                                                                                    
                                                                                                              
                                                                                                              
  PROCEND make_references_list;                                                                               
?? OLDTITLE ??                                                                                                
?? NEWTITLE := '[XDCL] ocp$build_module_attributes', EJECT ??                                                 
                                                                                                              
{ PURPOSE:                                                                                                    
{   Return the command language value for the specified module.                                               
{                                                                                                             
{ GENERATED VALUE:                                                                                            
{   If only one attribute is requested then a that value is returned othewise                                 
{   the attributes are grouped in a record.                                                                   
{                                                                                                             
{   record                                                                                                    
{     fields selected on function call                                                                        
{   recend                                                                                                    
                                                                                                              
  PROCEDURE [XDCL] ocp$build_module_attributes                                                                
    (    attribute_keywords: oct$attribute_keyword_set;                                                       
     VAR module_description: {READ} oct$module_description;                                                   
         changed_info: ^oct$changed_info;                                                                     
     VAR work_area: ^clt$work_area;                                                                           
     VAR result: ^clt$data_value;                                                                             
     VAR status: ost$status);                                                                                 
                                                                                                              
                                                                                                              
    VAR                                                                                                       
      application_identifier: ost$name,                                                                       
      attribute: oct$module_attribute_keywords,                                                               
      desired_attributes: oct$attribute_keyword_set,                                                          
      field: 0 .. occ$kwd_last_attribute,                                                                     
      fields: array [occ$kwd_name .. occ$kwd_last_attribute] of clt$field_value,                              
      index: oct$module_attribute_keywords,                                                                   
      info: attribute_info,                                                                                   
      last_attribute: oct$module_attribute_keywords,                                                          
      module_kind: text_module_kind,                                                                          
      requested_attributes: oct$attribute_keyword_set,                                                        
      standard_header: llt$library_member_header;                                                             
                                                                                                              
    status.normal := TRUE;                                                                                    
    CASE module_description.kind OF                                                                           
    = occ$cpu_object_module =                                                                                 
      info := cpu_object_module_attributes;                                                                   
    = occ$ppu_object_module =                                                                                 
      info := ppu_object_module_attributes;                                                                   
    = occ$load_module, occ$bound_module =                                                                     
      info := load_module_attributes;                                                                         
    = occ$program_description, occ$applic_program_description =                                               
      info := program_description_attributes;                                                                 
    = occ$command_procedure, occ$applic_command_procedure =                                                   
      info := command_procedure_attributes;                                                                   
    = occ$command_description, occ$applic_command_description =                                               
      info := command_description_attributes;                                                                 
    = occ$function_procedure =                                                                                
      info := function_procedure_attributes;                                                                  
    = occ$function_description =                                                                              
      info := function_description_attributes;                                                                
    = occ$message_module =                                                                                    
      info := message_module_attributes;                                                                      
    = occ$panel_module =                                                                                      
      info := form_module_attributes;                                                                         
    ELSE                                                                                                      
      info.kind := 'UNKNOWN';                                                                                 
      info.valid_attributes := header_attributes;                                                             
    CASEND;                                                                                                   
                                                                                                              
    requested_attributes := attribute_keywords;                                                               
    IF occ$kwd_all IN requested_attributes THEN                                                               
      requested_attributes := info.valid_attributes;                                                          
    ELSE                                                                                                      
      IF occ$kwd_program_attributes IN requested_attributes THEN                                              
        requested_attributes := requested_attributes + program_attributes_group;                              
      IFEND;                                                                                                  
      IF occ$kwd_header IN requested_attributes THEN                                                          
        requested_attributes := requested_attributes + header_attributes;                                     
      IFEND;                                                                                                  
    IFEND;                                                                                                    
                                                                                                              
    desired_attributes := requested_attributes * info.valid_attributes;                                       
                                                                                                              
    field := 0;                                                                                               
    FOR index := 1 TO UPPERBOUND (ocv$module_attribute_keys) DO                                               
      attribute := ocv$module_attribute_keys [index].attribute;                                               
      IF (attribute <= occ$kwd_last_attribute) AND (attribute IN requested_attributes) THEN                   
        field := field + 1;                                                                                   
        last_attribute := attribute;                                                                          
        fields [attribute].name := ocv$module_attribute_keys [index].name;                                    
        fields [attribute].value := NIL;                                                                      
      IFEND;                                                                                                  
    FOREND;                                                                                                   
                                                                                                              
    build_standard_header (changed_info, module_description, module_kind, application_identifier,             
          standard_header, status);                                                                           
    IF NOT status.normal THEN                                                                                 
      RETURN;                                                                                                 
    IFEND;                                                                                                    
                                                                                                              
{ Kind                                                                                                        
                                                                                                              
    IF occ$kwd_kind IN desired_attributes THEN                                                                
      clp$make_keyword_value (info.kind, work_area, fields [occ$kwd_kind].value);                             
    IFEND;                                                                                                    
                                                                                                              
    make_header_fields (desired_attributes, application_identifier, standard_header, module_kind, work_area,  
          fields, status);                                                                                    
    IF NOT status.normal THEN                                                                                 
      RETURN;                                                                                                 
    IFEND;                                                                                                    
                                                                                                              
    IF occ$kwd_aliases IN desired_attributes THEN                                                             
      make_alias_list (changed_info, module_description, work_area, fields [occ$kwd_aliases], status);        
      IF NOT status.normal THEN                                                                               
        RETURN;                                                                                               
      IFEND;                                                                                                  
    IFEND;                                                                                                    
                                                                                                              
    CASE module_description.kind OF                                                                           
    = occ$cpu_object_module, occ$load_module, occ$bound_module, occ$command_procedure, occ$function_procedure,
          occ$applic_command_procedure =                                                                      
      make_executable_attributes (desired_attributes, changed_info, module_description, work_area, fields,    
            status);                                                                                          
      IF NOT status.normal THEN                                                                               
        RETURN;                                                                                               
      IFEND;                                                                                                  
      make_other_exec_attributes (desired_attributes, changed_info, module_description, work_area, fields,    
            status);                                                                                          
    = occ$command_description, occ$applic_command_description =                                               
      make_executable_attributes (desired_attributes, changed_info, module_description, work_area, fields,    
            status);                                                                                          
      IF NOT status.normal THEN                                                                               
        RETURN;                                                                                               
      IFEND;                                                                                                  
      make_command_attributes (desired_attributes, changed_info, standard_header, module_description,         
            work_area, fields, status);                                                                       
    = occ$function_description =                                                                              
      make_executable_attributes (desired_attributes, changed_info, module_description, work_area, fields,    
            status);                                                                                          
      IF NOT status.normal THEN                                                                               
        RETURN;                                                                                               
      IFEND;                                                                                                  
      make_function_attributes (desired_attributes, changed_info, standard_header, module_description,        
            work_area, fields, status);                                                                       
    = occ$program_description, occ$applic_program_description =                                               
      build_program_attributes (desired_attributes, standard_header, changed_info, module_description,        
            work_area, fields, status);                                                                       
    = occ$message_module =                                                                                    
      build_message_module_attributes (desired_attributes, standard_header, changed_info, module_description, 
            work_area, fields, status);                                                                       
    ELSE                                                                                                      
    CASEND;                                                                                                   
    IF NOT status.normal THEN                                                                                 
      RETURN;                                                                                                 
    IFEND;                                                                                                    
                                                                                                              
    clp$make_record_value (field, work_area, result);                                                         
                                                                                                              
    field := 0;                                                                                               
    FOR attribute := occ$kwd_name TO occ$kwd_last_attribute DO                                                
      IF attribute IN requested_attributes THEN                                                               
        field := field + 1;                                                                                   
        IF fields [attribute].value = NIL THEN                                                                
          clp$make_unspecified_value (work_area, fields [attribute].value);                                   
        IFEND;                                                                                                
        result^.field_values^ [field] := fields [attribute];                                                  
      IFEND;                                                                                                  
    FOREND;                                                                                                   
                                                                                                              
  PROCEND ocp$build_module_attributes;                                                                        
?? OLDTITLE ??                                                                                                
MODEND ocm$build_module_attributes;                                                                           
