?? RIGHT := 110 ??
MODULE ocm$process_dictionaries;
*copyc osd$default_pragmats
?? PUSH (LISTEXT := ON) ??
*copyc llt$object_library_header
*copyc oct$offset_change_list
*copyc llt$section_address
*copyc llt$module_dictionary
*copyc llt$entry_point_dictionary
*copyc llt$command_dictionary
*copyc llt$function_dictionary
*copyc llt$help_module_dictionary
*copyc llt$message_module_dictionary
*copyc llt$panel_dictionary
*copyc ocp$new_global_offset
*copyc ocp$process_module_dictionary
*copyc ocp$process_ept_dictionary
*copyc ocp$process_command_dictionary
*copyc ocp$process_function_dictionary
*copyc ocp$process_help_dictionary
*copyc ocp$process_message_dictionary
*copyc ocp$process_panel_dictionary
?? POP ??
*copyc och$process_dictionaries

  PROCEDURE [XDCL] ocp$process_dictionaries (ol_dictionary_ocv: ^oct$offset_change_list;
        mod_dictionary_ocv: ^oct$offset_change_list;
        p_object_library: ^SEQ ( * );
    VAR status: ost$status);

    VAR
      module_dictionary: record
        case boolean of
        = TRUE =
          pointer: ^llt$module_dictionary,
        = FALSE =
          pva: ^cell,
        casend,
      recend,

      entry_point_dictionary: record
        case boolean of
        = TRUE =
          pointer: ^llt$entry_point_dictionary,
        = FALSE =
          pva: ^cell,
        casend,
      recend,

      command_dictionary: record
        case boolean of
        = TRUE =
          pointer: ^llt$command_dictionary,
        = FALSE =
          pva: ^cell,
        casend,
      recend,

      function_dictionary: record
        case boolean of
        = TRUE =
          pointer: ^llt$function_dictionary,
        = FALSE =
          pva: ^cell,
        casend,
      recend,

      help_dictionary: record
        case boolean of
        = TRUE =
          pointer: ^llt$help_module_dictionary,
        = FALSE =
          pva: ^cell,
        casend,
      recend,

      message_dictionary: record
        case boolean of
        = TRUE =
          pointer: ^llt$message_module_dictionary,
        = FALSE =
          pva: ^cell,
        casend,
      recend,

      panel_dictionary: record
        case boolean of
        = TRUE =
          pointer: ^llt$panel_dictionary,
        = FALSE =
          pva: ^cell,
        casend,
      recend,


      header: ^llt$object_library_header,
      i: 0 .. llc$max_dictionaries_on_library,
      new_offset: llt$section_address_range,
      object_library: ^SEQ ( * ),
      object_library_dictionaries: ^llt$object_library_dictionaries;

    object_library := p_object_library;

    RESET object_library;
    NEXT header IN object_library;
    NEXT object_library_dictionaries: [1 .. header^.number_of_dictionaries] IN object_library;

    FOR i := 1 TO header^.number_of_dictionaries DO
      CASE object_library_dictionaries^ [i].kind OF
      = llc$module_dictionary =
        module_dictionary.pointer := #PTR (object_library_dictionaries^ [i].module_dictionary,
              object_library^);
        ocp$process_module_dictionary (module_dictionary.pointer, mod_dictionary_ocv, object_library, status);
          IF NOT status.normal THEN
            RETURN;
          IFEND;

        new_offset := ocp$new_global_offset (#offset (module_dictionary.pointer), ol_dictionary_ocv);
        module_dictionary.pva := #address (#ring (module_dictionary.pointer), #segment (module_dictionary.
              pointer), new_offset);
        object_library_dictionaries^ [i].module_dictionary := #REL (module_dictionary.pointer,
              object_library^);
      = llc$entry_point_dictionary =
        entry_point_dictionary.pointer := #PTR (object_library_dictionaries^ [i].entry_point_dictionary,
              object_library^);
        ocp$process_ept_dictionary (entry_point_dictionary.pointer, mod_dictionary_ocv, object_library);

        new_offset := ocp$new_global_offset (#offset (entry_point_dictionary.pointer), ol_dictionary_ocv);
        entry_point_dictionary.pva := #address (#ring (entry_point_dictionary.pointer), #segment
              (entry_point_dictionary.pointer), new_offset);
        object_library_dictionaries^ [i].entry_point_dictionary := #REL (entry_point_dictionary.pointer,
              object_library^);
      = llc$command_dictionary =
        command_dictionary.pointer := #PTR (object_library_dictionaries^ [i].command_dictionary,
              object_library^);
        ocp$process_command_dictionary (command_dictionary.pointer, mod_dictionary_ocv, object_library,
              status);
        IF NOT status.normal THEN
          RETURN;
        IFEND;

        new_offset := ocp$new_global_offset (#offset (command_dictionary.pointer), ol_dictionary_ocv);
        command_dictionary.pva := #address (#ring (command_dictionary.pointer), #segment (command_dictionary.
              pointer), new_offset);
        object_library_dictionaries^ [i].command_dictionary := #REL (command_dictionary.pointer,
              object_library^);
      = llc$function_dictionary =
        function_dictionary.pointer := #PTR (object_library_dictionaries^ [i].function_dictionary,
              object_library^);
        ocp$process_function_dictionary (function_dictionary.pointer, mod_dictionary_ocv, object_library);

        new_offset := ocp$new_global_offset (#offset (function_dictionary.pointer), ol_dictionary_ocv);
        function_dictionary.pva := #address (#ring (function_dictionary.pointer), #segment
              (function_dictionary.pointer), new_offset);
        object_library_dictionaries^ [i].function_dictionary := #REL (function_dictionary.pointer,
              object_library^);
      = llc$help_module_dictionary =
        help_dictionary.pointer := #PTR (object_library_dictionaries^ [i].help_module_dictionary,
              object_library^);
        ocp$process_help_dictionary (help_dictionary.pointer, mod_dictionary_ocv, object_library);

        new_offset := ocp$new_global_offset (#offset (help_dictionary.pointer), ol_dictionary_ocv);
        help_dictionary.pva := #address (#ring (help_dictionary.pointer), #segment (help_dictionary.pointer),
              new_offset);
        object_library_dictionaries^ [i].help_module_dictionary := #REL (help_dictionary.pointer,
              object_library^);
      = llc$message_module_dictionary =
        message_dictionary.pointer := #PTR (object_library_dictionaries^ [i].message_module_dictionary,
              object_library^);
        ocp$process_message_dictionary (message_dictionary.pointer, mod_dictionary_ocv, object_library);

        new_offset := ocp$new_global_offset (#offset (message_dictionary.pointer), ol_dictionary_ocv);
        message_dictionary.pva := #address (#ring (message_dictionary.pointer), #segment (message_dictionary.
              pointer), new_offset);
        object_library_dictionaries^ [i].message_module_dictionary := #REL (message_dictionary.pointer,
              object_library^);
      = llc$panel_dictionary =
        panel_dictionary.pointer := #PTR (object_library_dictionaries^ [i].panel_dictionary, object_library^);
        ocp$process_panel_dictionary (panel_dictionary.pointer, mod_dictionary_ocv, object_library);

        new_offset := ocp$new_global_offset (#offset (panel_dictionary.pointer), ol_dictionary_ocv);
        panel_dictionary.pva := #address (#ring (panel_dictionary.pointer), #segment (panel_dictionary.
              pointer), new_offset);
        object_library_dictionaries^ [i].panel_dictionary := #REL (panel_dictionary.pointer, object_library^);
      CASEND;
    FOREND;
  PROCEND ocp$process_dictionaries;
MODEND ocm$process_dictionaries;
