?? RIGHT := 110 ??
?? NEWTITLE := 'NOS/VE SCL Interpreter : Set Message Mode Command' ??
MODULE clm$set_message_mode_command;

{
{ PURPOSE:
{   This module contains the processor for the change_message_mode command.
{

?? NEWTITLE := 'Global Declarations', EJECT ??
*copyc clp$evaluate_parameters
*copyc osp$set_message_level

?? TITLE := 'clp$_change_message_level', EJECT ??

  PROCEDURE [XDCL] clp$_change_message_level
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{ PROCEDURE (osm$chaml) change_message_level, set_message_mode, setmm, chaml (
{   level, il, information_level, l: key
{       (brief, b)
{       (full, f)
{     keyend = $required
{   status)

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

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 5] of clt$pdt_parameter_name,
      parameters: array [1 .. 2] of clt$pdt_parameter,
      type1: record
        header: clt$type_specification_header,
        qualifier: clt$keyword_type_qualifier,
        keyword_specs: array [1 .. 4] of clt$keyword_specification,
      recend,
      type2: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [89, 1, 26, 6, 11, 39, 562],
    clc$command, 5, 2, 1, 0, 0, 0, 2, 'OSM$CHAML'], [
    ['IL                             ',clc$alias_entry, 1],
    ['INFORMATION_LEVEL              ',clc$alias_entry, 1],
    ['L                              ',clc$abbreviation_entry, 1],
    ['LEVEL                          ',clc$nominal_entry, 1],
    ['STATUS                         ',clc$nominal_entry, 2]],
    [
{ PARAMETER 1
    [4, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 155,
  clc$required_parameter, 0, 0],
{ PARAMETER 2
    [5, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_reference, clc$immediate_evaluation, clc$standard_parameter_checking, 3,
  clc$optional_parameter, 0, 0]],
{ PARAMETER 1
    [[1, 0, clc$keyword_type], [4], [
    ['B                              ', clc$abbreviation_entry, clc$normal_usage_entry, 1],
    ['BRIEF                          ', clc$nominal_entry, clc$normal_usage_entry, 1],
    ['F                              ', clc$abbreviation_entry, clc$normal_usage_entry, 2],
    ['FULL                           ', clc$nominal_entry, clc$normal_usage_entry, 2]]
    ],
{ PARAMETER 2
    [[1, 0, clc$status_type]]];

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

    CONST
      p$level = 1,
      p$status = 2;

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

    VAR
      message_level: osc$brief_message_level .. osc$full_message_level;


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

    IF pvt [p$level].value^.keyword_value = 'BRIEF' THEN
      message_level := osc$brief_message_level;
    ELSE
      message_level := osc$full_message_level;
    IFEND;

    osp$set_message_level (message_level, status);

  PROCEND clp$_change_message_level;

MODEND clm$set_message_mode_command;
