MODULE SCA$REPORT_GLOBALS IDENT "T4.0-1" !************************************************************************* ! * ! © 2000 BY * ! COMPAQ COMPUTER CORPORATION * ! © 2000 BY * ! ELECTRONIC DATA SYSTEMS LIMITED * ! * ! THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND COPIED * ! ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE * ! INCLUSION OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE OR ANY OTHER * ! COPIES THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY * ! OTHER PERSON. NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY * ! TRANSFERRED. * ! * ! THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE * ! AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY COMPAQ COMPUTER * ! CORPORATION OR EDS. * ! * ! NEITHER COMPAQ NOR EDS ASSUME ANY RESPONSIBILITY FOR THE USE OR * ! RELIABILITY OF THIS SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY * ! COMPAQ. * ! * !************************************************************************* !++ ! Facility: ! SCA - Source Code Analyzer ! REPORT - Report Subfacility ! ! Abstract: ! This module defines the global variables used by the report subfacility. ! NOTE: Variables and constants used to customize reports are contained ! in the file sca$report_customizations.tpu. ! ! Table of Contents: ! ! 1. Global variables corresponding to REPORT command qualifiers ! 2. Temporary buffers used during reports ! 3. Constants and global variables for query processing ! 3a. Index values for result arrays ! 3b. Global variables for query processing ! 4. Constants and global variables used to build report definitions ! 4a. Constant values for definition entry options ! 4b. Constant values for attribute types ! 4c. Constant values for result locations ! 4d. Constant values for specifying when to invoke an action routine ! 4e. Constant values for the index of each element of an action routine ! description ! 4f. Global variables for report definition entries ! 5. Other global variables ! 6. Initialization code !-- ! Global variables corresponding to REPORT command qualifiers ! ! The following global variables are part of the interface between LSE and ! the report tool. LSE fills in the values of these variables on the basis ! of the REPORT command parameters and qualifiers. ! VARIABLE sca$report_domain_query, ! string ! query to use for driving a report sca$report_fill, ! boolean ! true if we fill paragraphs sca$report_help_library, ! string ! name of help library for PACKAGE ! reports sca$report_languages, ! string ! languages for PACKAGE reports sca$report_name, ! string ! name of report being invoked sca$report_output, ! string ! output file for report sca$report_rest_of_line, ! string ! rest of command line that invoked ! this report sca$report_target; ! string ! target type for report ! Temporary buffers used during report processing ! VARIABLE sca$report_code_fragment_buffer, ! buffer ! buffer for Body section of ! INTERNALS report sca$report_output_buffer, ! buffer ! buffer to use for output sca$report_parameter_description_buffer, ! buffer ! buffer for constructing parameter ! descriptions sca$report_scratch_buffer, ! buffer ! general purpose scratch buffer sca$report_subprocess_buffer,! buffer ! buffer assigned to subprocess sca$report_tag_value_buffer;! buffer ! buffer for constructing tag values CONSTANT sca$report_scratch := 'SCA$REPORT_SCRATCH'; ! Name of scratch buffer ! Constants and global variables for query processing ! Index values for result arrays ! CONSTANT sca$report_k_entry_parent_link := 1, sca$report_k_entry_level_sibling_link := 2, sca$report_k_entry_label := 3, sca$report_k_entry_level_number := 4, sca$report_k_entry_number_occurrences := 5, sca$report_k_entry_first_occurrence_offset := 5, sca$report_k_occurrence_parent_link := 1, sca$report_k_occurrence_sublevel_link := 2, sca$report_k_occurrence_first_result_offset := 2; ! Global variables for query processing ! VARIABLE sca$report_command_context, ! integer ! report's command context for SCA sca$report_current_entity, ! integer ! entity handle for current entity sca$report_current_entity_query_name, ! string ! query name of current entity sca$report_current_entry_result, ! array ! result array for current ! definition entry sca$report_current_file, ! string ! file name of file currently being ! processed sca$report_current_language_LSE, ! string ! source language of file currently ! being processed, from LSE sca$report_current_language_SCA, ! string ! source language of file currently ! being processed, from SCA sca$report_current_occurrence_result, ! array ! result array for current ! occurrence sca$report_open_queries, ! array ! stack of currently open queries sca$report_open_query_index;! integer ! last open query ! Constants and global variables used to build report definitions ! Constant values for definition entry options - these values are added ! together to form a single value giving the set of options for an entry. ! CONSTANT sca$report_k_option_once_only := 1, sca$report_k_option_all_occurrences := 2, sca$report_k_option_newitem := 4, sca$report_k_option_order_lexical := 8, sca$report_k_option_ignore_entry := 16; ! (Next value should be 32, etc.) ! Constant values for attribute types ! CONSTANT sca$report_k_info_type_name := 1, sca$report_k_info_type_return_value_type := 2, sca$report_k_info_type_variable_type := 3, sca$report_k_info_type_tag_name := 4, sca$report_k_info_type_tag_text := 5, sca$report_k_info_type_constant := 6, sca$report_k_info_type_source_file := 7, sca$report_k_info_type_source_location := 8, sca$report_k_info_type_decl_type := 9, sca$report_k_info_type_routine_range := 10, sca$report_k_info_type_name_SCA := 11, sca$report_k_info_type_mechanism := 12, sca$report_k_info_type_decl_class := 13, sca$report_k_info_type_max := 13; ! Constant values for result locations ! CONSTANT sca$report_location_file_name := 1, sca$report_location_module_name := 1, sca$report_location_module_decl_class := 2, sca$report_location_routine_name := 1, sca$report_location_routine_type := 2, sca$report_location_routine_decl_type := 3, sca$report_location_routine_range := 4, sca$report_location_routine_decl_class := 5, sca$report_location_parameter_name := 1, sca$report_location_parameter_type := 2, sca$report_location_parameter_name_SCA := 5, sca$report_location_parameter_mechanism := 6, sca$report_location_object_name := 1, sca$report_location_object_type := 2, sca$report_location_source_location := 3, sca$report_location_source_file := 4, sca$report_location_object_decl_class := 5, sca$report_location_tag_name := 1, sca$report_location_tag_text := 2, sca$report_location_section_label := 6; ! Constant values for specifying when to invoke an action routine ! CONSTANT sca$report_k_invoke_before_query := 1, sca$report_k_invoke_after_query := 2, sca$report_k_invoke_after_empty_query := 3, sca$report_k_invoke_before_each_entity := 4, sca$report_k_invoke_after_each_entity := 5, sca$report_k_invoke_after_all_entities := 6, sca$report_k_invoke_type_max := 6; ! Constant values for the index of each element of an action routine ! description ! CONSTANT sca$report_k_routine_name_index := 1, sca$report_k_invoke_option_index := 2; ! Global variables for report definition entries ! VARIABLE sca$report_level_array, ! array containing level number for each entry sca$report_label_array, ! array containing (optional) label for each entry sca$report_option_array,! array containing (optional) processing options ! for each entry sca$report_query_array, ! array containing query string(s) for each entry sca$report_info_arrays, ! array containing array of attribute types and ! locations for each entry sca$report_entity_name_array, ! array containing query name to be assigned to ! each entity within the final query of the entry sca$report_action_routine_arrays, ! array containing array of action routines for ! entry sca$report_definition_max_index, ! integer index of last entry in report definition ! array for current report sca$report_subdefinition_name, ! name of the current subdefinition sca$report_subdefinition_array, ! array containing subdefinitions for this report sca$report_subdefinition_index, ! integer index of last entry in subdefinition array sca$report_definition_stack, ! stack of definitions used during subdefinition ! processing sca$report_definition_stack_index; ! stack index for definition stack ! Other global variables ! The following variables are used for communication between TPU procedures, ! or as OWN variables. ! VARIABLE sca$report_output_file_name,! string ! file name to use for output sca$report_saved_position, ! marker ! position at start of report sca$report_saved_window, ! window ! window at start of report sca$report_subprocess_id, ! process id! process id of subprocess sca$report_target_index, ! integer ! integer representation of ! sca$report_target sca$report_target_types, ! array ! file extensions for target types ! (initialized in Initialization ! Code section, below) sca$report_temp_file_name, ! string ! file name to use for temporary ! file sca$report_temp_file_spec, ! string ! full file spec of temporary file sca$report_work_file_name, ! string ! file name to use for work file sca$report_work_file_spec; ! string ! full file spec of work file ENDMODULE ! Initialization code ! Define the file extensions for all the possible target types (values of the ! /TARGET qualifier). ! sca$report_target_types := CREATE_ARRAY (sca$report_k_last_target_index, sca$report_k_first_target_index); sca$report_target_types{sca$report_k_target_text} := 'TXT'; sca$report_target_types{sca$report_k_target_runoff} := 'RNO'; sca$report_target_types{sca$report_k_target_document} := 'SDML'; sca$report_target_types{sca$report_k_target_lsedit} := 'LSE'; sca$report_target_types{sca$report_k_target_help} := 'HLP'; sca$report_target_types{sca$report_k_target_other} := 'TXT';