1 SUB SMG_CHANGE_DEF_ATTR(LONG Rendition,LONG Vir_disp_num) !---------------------------------------------------------------& ! & ! SMG_CHANGE_DEF_ATTR & ! & ! Creation Date: 3-July-1985 & ! Author: Ken Messer & ! Purpose: Change a virtual display's & ! video Rendition & ! & ! Modification history & ! & ! Date Description of change(s) & ! & !---------------------------------------------------------------& ! & ! Copyright (c) 1985 - Ken Messer, Allied Electronics, Inc., & ! 401 E. 8th St., Ft. Worth, TX 76102 & ! & ! This software may be copied and distributed freely to anyone & ! for non-commerical use provided that this copyright notice is & ! included. & !---------------------------------------------------------------& OPTION TYPE = INTEGER, SIZE = INTEGER LONG %include "SMG$LIBRARY:SMG.DFN" DECLARE LONG Return_status, & New_video_attr, & Number_rows, & Number_columns EXTERNAL LONG FUNCTION SMG$Get_Display_Attr, & SMG$Change_virtual_display EXTERNAL LONG CONSTANT SS$_Normal, & SMG$M_Blink, & SMG$M_Bold, & SMG$M_Reverse, & SMG$M_Underline EXTERNAL STRING FUNCTION Get_Error_Message(LONG) !---------------------------------------------------------------& ! & ! M a i n P r o g r a m L o g i c & ! & !---------------------------------------------------------------& ! Test the rendition mask and set the specified video attributes New_video_attr = 0 New_video_attr = New_video_attr OR SMG$M_Blink IF Rendition AND 1 New_video_attr = New_video_attr OR SMG$M_Bold IF Rendition AND 2 New_video_attr = New_video_attr OR SMG$M_Reverse IF Rendition AND 4 New_video_attr = New_video_attr OR SMG$M_Underline IF Rendition AND 8 ! get the number of rows and columns in the display - we'll use ! the current values since we're not changing them Return_status = SMG$Get_Display_Attr(Display_id(Vir_disp_num), & Number_rows, Number_columns,,,) IF Return_status AND SS$_Normal = 0 THEN PRINT Get_Error_Message(Return_status) STOP END IF ! Call the SMG RTL routine to change the rendition Return_status = SMG$Change_virtual_display(Display_id(Vir_disp_num), & Number_rows,Number_columns,,New_video_attr,) ! Check for error IF Return_status AND SS$_Normal = 0 THEN PRINT Get_Error_Message(Return_status) STOP END IF SUBEXIT END SUB