?? NEWTITLE := '~~~~~   common deck DSI$DISPLAY_DAYFILE_MESSAGE', EJECT ??
{************************************************************

{  Put message in dayfile, deck DSI$DISPLAY_DAYFILE_MESSAGE.

{************************************************************
?? PUSH (LISTEXT := ON) ??
*copyc zutps2d
*copyc zn7pmsg
?? POP ??

  CONST
    system_dayf = 0,
    bdisplay_line1 = 1,
    bdisplay_line2 = 2,
    user_dayf = 3,
    error_log = 4,
    account = 5,
    debug_log = 7;

?? SKIP := 3 ??

{ PURPOSE:
{   Write string into dayfile.

  PROCEDURE [XDCL] dyfstring
    (    s: string ( * );
         dayfile: 0 .. 7);

    VAR
      dcm: ARRAY [1 .. 8] OF PACKED ARRAY [0 .. 9] OF 0 .. 3f(16),
      dcwi: integer,
      dcci: 0 .. 9,
      log: integer,
      si: ost$string_index,
      eol: boolean;

    log := dayfile;
    IF sw1 IN jcr.sense_switches THEN
      log := user_dayf;
    IFEND;
    IF log <> debug_log THEN
      si := 1;
      dcwi := 1;
      dcci := 0;
      eol := TRUE;
      utp$convert_string_to_dc_string (utc$ascii64, dcm, dcwi, dcci, s, si,
            eol);
      n7p$issue_dayfile_message (#LOC (dcm), log);
    IFEND;

  PROCEND dyfstring;

{ PURPOSE:
{  Send message and number to dayfile.

  PROCEDURE [XDCL] dyfstrnum
    (    s: string ( * );
         value: integer;
         dayfile: 0 .. 7);

    VAR
      new_s: ^string ( * ),
      n,
      i: integer;

    i := STRLENGTH (s);
    PUSH new_s: [i + 10];
    new_s^ (1, i) := s (1, i);
    new_s^ (i + 1, 10) := '          ';
    STRINGREP (new_s^ (i + 1, 10), n, value);
    dyfstring (new_s^, dayfile);

  PROCEND dyfstrnum;
?? OLDTITLE ??
