Trailing-Edge
-
PDP-10 Archives
-
bb-r775d-bm_tops20_ks_upd_4
-
sources/chmmess.bli
There are 11 other files named chmmess.bli in the archive. Click here to see a list.
%TITLE 'CHMMESS - output a message'
MODULE CHMMESS ( ! Output a message
IDENT = '3-001' ! File: CHMMESS.BLI Edit: GB3001
) =
BEGIN
!
! COPYRIGHT (c) 1981, 1985 BY
! DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.
! ALL RIGHTS RESERVED.
!
! 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 AND 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 DIGITAL EQUIPMENT
! CORPORATION.
!
! DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
! SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL.
!
!++
! FACILITY: EDT -- The DEC Standard Editor
!
! ABSTRACT:
!
! This module outputs a message on the last line of the terminal.
!
! ENVIRONMENT: Runs at any access mode - AST reentrant
!
! AUTHOR: Bob Kushlis, CREATION DATE: Unknown
!
! MODIFIED BY:
!
! 1-001 - Original. DJS 04-Feb-1981. This module was created by
! extracting the routine EDT$$OUT_MSG from module CHANGE.BLI.
! 1-002 - Regularize headers. JBS 03-Mar-1981
! 1-003 - Make this routine general for messages or strings. SMB 30-Jun-1982
! 1-004 - Remove setting to TI_WRSTR in case HCPY change mode. SMB 02-Jul-1982
! 1-005 - Set LASTMSG. JBS 05-Jul-1982
! 1-006 - Call EDT$$FMT_STR instead of EDT$$FMT_LIT, so EDT$$G_PRV_COL will be
! kept up to date. JBS 05-Oct-1982
! 1-007 - Don't clear EDT$$G_SCR_CHGD. JBS 09-Oct-1982
! 1-008 - Bypadd most of the fancy stuff if we are in hardcopy change mode. JBS 16-Nov-1982
! 1-009 - Check for terminal type unkown also. SMB 03-Dec-1982
! 3-001 - Add updates from V3 source kit. GB 27-Apr-1983
!--
%SBTTL 'Declarations'
!
! TABLE OF CONTENTS:
!
REQUIRE 'EDTSRC:TRAROUNAM';
FORWARD ROUTINE
EDT$$OUT_MSG : NOVALUE; ! Output a message on the last line of the terminal
!
! INCLUDE FILES:
!
REQUIRE 'EDTSRC:EDTREQ';
!
! MACROS:
!
! NONE
!
! EQUATED SYMBOLS:
!
! NONE
!
! OWN STORAGE:
!
! NONE
!
! EXTERNAL REFERENCES:
!
! In the routine
%SBTTL 'EDT$$OUT_MSG - output a message'
GLOBAL ROUTINE EDT$$OUT_MSG ( ! Output a message
POS, ! Line number for this message
MESS, ! The message number to output
ADDR, ! Address of a string
LEN ! Length of a string
) : NOVALUE =
!++
! FUNCTIONAL DESCRIPTION:
!
! This routine outputs a message on the last line of the terminal.
! The input parameters are the line position for the message,
! the message number (if it is a message), or the message string and
! its length if no message number is present.
!
! FORMAL PARAMETERS:
!
! POS The line number on which to print message
!
! MESS The number of the message to output
!
! ADDR The address of a string message
!
! LEN The length of the string message
!
! IMPLICIT INPUTS:
!
! TI_TYP
! FMT_WRRUT
! MESSAGE_LINE
!
! IMPLICIT OUTPUTS:
!
! TIN_ECHOPOS
! MSGFLG
! LASTMSG
!
! ROUTINE VALUE:
!
! NONE
!
! SIDE EFFECTS:
!
! NONE
!
!--
BEGIN
EXTERNAL ROUTINE
EDT$$STOP_WKINGMSG, ! Stop the working message
EDT$$FMT_STR, ! Put a string in format buffer
EDT$$OUT_FMTBUF, ! Output the format buffer
EDT$$SC_POSCSIF, ! Put cursor position in format buffer
EDT$$SC_ERATOEOL, ! Erase to end of line
EDT$$SC_REVID, ! Start reverse video
EDT$$MSG_TOSTR; ! Get message text
EXTERNAL
MESSAGE_LINE, ! Message line
TIN_ECHOPOS, ! Column to start message echo
MSGFLG, ! 1 = erase the message line on the next keystroke
LASTMSG, ! The last message printed
TI_TYP; ! Type of terminal
EDT$$STOP_WKINGMSG ();
!+
! If the message is being printed on the last line, then we want it to
! stay there until the user hits a key, but we don't want to issue the
! PRTC message.
!-
IF (.POS EQL .MESSAGE_LINE + 1)
THEN
BEGIN
TIN_ECHOPOS = 0;
MSGFLG = 1;
END;
!+
! Don't do anything fancy if this is a hard copy terminal.
!-
IF (.TI_TYP NEQ TERM_HCPY) AND (.TI_TYP NEQ TERM_UNKNOWN)
THEN
BEGIN
!+
! Force the cursor to the indicated line and column
!-
EDT$$SC_POSCSIF (.POS, .TIN_ECHOPOS);
!+
! Erase the line.
!-
EDT$$SC_ERATOEOL ();
!+
! Turn reverse video on.
!-
EDT$$SC_REVID ();
END;
!+
! Get the message.
!-
IF (.LEN NEQ 0)
THEN
BEGIN
EDT$$FMT_STR (.ADDR, .LEN);
LASTMSG = 1;
END
ELSE
BEGIN
EDT$$MSG_TOSTR (.MESS);
LASTMSG = .MESS;
END;
!+
! Write out the buffer.
!-
EDT$$OUT_FMTBUF ();
END; ! of routine EDT$$OUT_MSG
END
ELUDOM