MODULE OCm$message_template_module ALIAS 'OCmsgtm';
?? LEFT := 1, RIGHT := 110 ??
?? FMT (FORMAT := ON, KEYW := UPPER, IDENT := LOWER) ??
?? SET (LIST := ON, LISTCTS := OFF) ??

  CONST
    osc$max_template_size = 24 * 80;

  TYPE
    ost$template_array_descriptor = array [1 .. * ] of
      ost$template_list_descriptor,

    ost$template_list_descriptor = record
      condition: ost$status_condition,
      condition_name: ost$name,
      severity: ost$status_severity,
      short_form: ^string ( * <= osc$max_string_size),
      long_form: ^string ( * <= osc$max_string_size),
    recend;

  SECTION
    oss$message_template_descriptor: READ,
    oss$message_template_strings: READ;


  CONST
    osc$max_name_size = 31,
    osc$null_name = '                               ';

  TYPE
    ost$name_size = 1 .. osc$max_name_size;

  TYPE
    ost$name = string (osc$max_name_size);

  TYPE
    ost$status_severity = (osc$informative_status, osc$warning_status,
      osc$error_status, osc$fatal_status, osc$catastrophic_status);

  CONST
    osc$max_condition = 999999,
    osc$status_parameter_delimiter = CHR (31) {Unit Separator} ;

  TYPE
    ost$status_condition = 0 .. osc$max_condition;

  TYPE
    ost$status = record
      case normal: boolean of
      = FALSE =
        identifier: string (2),
        condition: ost$status_condition,
        text: ost$string,
      casend,
    recend;


  CONST
    osc$max_string_size = 256;

  TYPE
    ost$string_size = 0 .. osc$max_string_size;

  TYPE
    ost$string_index = 1 .. osc$max_string_size + 1;

  TYPE
    ost$string = record
      size: ost$string_size,
      value: string (osc$max_string_size),
    recend;

?? EJECT ??
  CONST
    occ$status_id = 'OC',
    occ$status_condition = 530000;

  CONST
    oce$invalid_module_kind = occ$status_condition + 10,
{F Module kind +P invalid.}

    oce$no_section_definition = occ$status_condition + 20,
{F No section_definition for section number +P.}

    oce$offset_mismatch = occ$status_condition + 30,
{F Offset mismatch in predictor.}

    oce$invalid_section_length = occ$status_condition + 40,
{F Section lengths in predictor do not match.}

    oce$no_code_section = occ$status_condition + 50,
{F No code section found for module +P.}

    oce$no_section_maps = occ$status_condition + 60,
{E +P object library generated without section_maps.}

    oce$invalid_container = occ$status_condition + 70,
{F Relocation record container is invalid.}

    oce$invalid_relocation_address = occ$status_condition + 80,
{F Relocation record address field is invalid.}

    oce$unexpected_record_kind = occ$status_condition + 90,
{F Record type +P is unknown.}

    oce$binding_adr_not_found = occ$status_condition + 100,
{F Address formulation record not found for binding section.}

    oce$section_map_invalid_pointer = occ$status_condition + 110,
{F Section map pointer points to middle of +P record.}

    oce$text_record_expected = occ$status_condition + 120,
{F A text, replication, or bit_string_insertion record was expected.}

    oce$id_record_expected = occ$status_condition + 130,
{F Identification record was expected.}

    oce$breaklist_not_sorted = occ$status_condition + 140,
{F Breaklist is not sorted.}

    oce$files_dont_differ = occ$status_condition + 150,
{E Files are identical, correction not generated.}

    oce$bad_metapatch_generated = occ$status_condition + 160,
{F Correction generated produces invalid object library.}

    oce$invalid_library_version = occ$status_condition + 170;
{F Incompatible object library version on file +P.}
?? EJECT ??

  CONST
    number_of_entries_in_530000 = 18;
?? EJECT ??

  VAR
    osv$template_array_530000_p ALIAS 'm530000' : [XDCL, #GATE, READ, oss$message_template_descriptor]
      ^ost$template_array_descriptor := ^osv$template_array_530000,

    osv$template_array_530000: [STATIC, READ, oss$message_template_descriptor]
      ARRAY [1 .. number_of_entries_in_530000] OF ost$template_list_descriptor := [
        [oce$invalid_module_kind, 'oce$invalid_module_kind',
           osc$fatal_status, ^template_line_0, NIL],
        [oce$no_section_definition, 'oce$no_section_definition',
           osc$fatal_status, ^template_line_1, NIL],
        [oce$offset_mismatch, 'oce$offset_mismatch',
           osc$fatal_status, ^template_line_2, NIL],
        [oce$invalid_section_length, 'oce$invalid_section_length',
           osc$fatal_status, ^template_line_3, NIL],
        [oce$no_code_section, 'oce$no_code_section',
           osc$fatal_status, ^template_line_4, NIL],
        [oce$no_section_maps, 'oce$no_section_maps',
           osc$error_status, ^template_line_5, NIL],
        [oce$invalid_container, 'oce$invalid_container',
           osc$fatal_status, ^template_line_6, NIL],
        [oce$invalid_relocation_address, 'oce$invalid_relocation_address',
           osc$fatal_status, ^template_line_7, NIL],
        [oce$unexpected_record_kind, 'oce$unexpected_record_kind',
           osc$fatal_status, ^template_line_8, NIL],
        [oce$binding_adr_not_found, 'oce$binding_adr_not_found',
           osc$fatal_status, ^template_line_9, NIL],
        [oce$section_map_invalid_pointer, 'oce$section_map_invalid_pointer',
           osc$fatal_status, ^template_line_10, NIL],
        [oce$text_record_expected, 'oce$text_record_expected',
           osc$fatal_status, ^template_line_11, NIL],
        [oce$id_record_expected, 'oce$id_record_expected',
           osc$fatal_status, ^template_line_12, NIL],
        [oce$breaklist_not_sorted, 'oce$breaklist_not_sorted',
           osc$fatal_status, ^template_line_13, NIL],
        [oce$files_dont_differ, 'oce$files_dont_differ',
           osc$error_status, ^template_line_14, NIL],
        [oce$bad_metapatch_generated, 'oce$bad_metapatch_generated',
           osc$fatal_status, ^template_line_15, NIL],
        [oce$invalid_library_version, 'oce$invalid_library_version',
           osc$fatal_status, ^template_line_16, NIL],
        [0, '', osc$error_status, NIL, NIL]];
?? EJECT ??

  VAR
    template_line_0: [STATIC, READ, oss$message_template_strings] STRING(23) :=
      'Module kind +P invalid.';

  VAR
    template_line_1: [STATIC, READ, oss$message_template_strings] STRING(44) :=
      'No section_definition for section number +P.';

  VAR
    template_line_2: [STATIC, READ, oss$message_template_strings] STRING(29) :=
      'Offset mismatch in predictor.';

  VAR
    template_line_3: [STATIC, READ, oss$message_template_strings] STRING(42) :=
      'Section lengths in predictor do not match.';

  VAR
    template_line_4: [STATIC, READ, oss$message_template_strings] STRING(36) :=
      'No code section found for module +P.';

  VAR
    template_line_5: [STATIC, READ, oss$message_template_strings] STRING(49) :=
      '+P object library generated without section_maps.';

  VAR
    template_line_6: [STATIC, READ, oss$message_template_strings] STRING(39) :=
      'Relocation record container is invalid.';

  VAR
    template_line_7: [STATIC, READ, oss$message_template_strings] STRING(43) :=
      'Relocation record address field is invalid.';

  VAR
    template_line_8: [STATIC, READ, oss$message_template_strings] STRING(26) :=
      'Record type +P is unknown.';

  VAR
    template_line_9: [STATIC, READ, oss$message_template_strings] STRING(57) :=
      'Address formulation record not found for binding section.';

  VAR
    template_line_10: [STATIC, READ, oss$message_template_strings] STRING(50) :=
      'Section map pointer points to middle of +P record.';

  VAR
    template_line_11: [STATIC, READ, oss$message_template_strings] STRING(65) :=
      'A text, replication, or bit_string_insertion record was expected.';

  VAR
    template_line_12: [STATIC, READ, oss$message_template_strings] STRING(35) :=
      'Identification record was expected.';

  VAR
    template_line_13: [STATIC, READ, oss$message_template_strings] STRING(24) :=
      'Breaklist is not sorted.';

  VAR
    template_line_14: [STATIC, READ, oss$message_template_strings] STRING(46) :=
      'Files are identical, correction not generated.';

  VAR
    template_line_15: [STATIC, READ, oss$message_template_strings] STRING(53) :=
      'Correction generated produces invalid object library.';

  VAR
    template_line_16: [STATIC, READ, oss$message_template_strings] STRING(47) :=
      'Incompatible object library version on file +P.';

MODEND OCm$message_template_module;
