2 SUB VPW_TITLE(Title$,Ident$,INTEGER Terminal_Type) ! ! This subroutine will display the title for Vax Professional ! workstation tasks. Input is the title (passed as a literal ! string) and the terminal type found from $GETDVI DECLARE INTEGER Itemp DECLARE INTEGER Ilength ! DECLARE INTEGER I,Ipos ! Process$=" " ! Pre_extend string (15 char) CALL Get_Process_Name(Process$,Ilength) ! Get Process name Process$=SEG$(Process$,1,Ilength) ! Extract real part Process$=" >>> "+Process$+" <<< " ! Ilength=Ilength+10 ! IF Terminal_Type >= 96 THEN ! If a VT100 type terminal Ident_Length=LEN(Ident$) ! Title_Length=LEN(Title$)+4 ! Spaces on each side Pre_Fill=(40-Title_Length)/2 ! # of prefill spaces Pre_Fill$=SPACE$(Pre_Fill) ! ESC$=CHR$(27) ! Bold$=ESC$+"[1m" ! DblU$=ESC$+"#3" ! Convert to dbl ht top line DblL$=ESC$+"#4" ! Convert to dbl ht bot line Norm$=ESC$+"[0m" ! All attributes off Rvid$=ESC$+"[7m" ! Reverse video Process$=Bold$+Process$+Norm$ ! Make prc name bold Blank_LineL$=Rvid$+SPACE$(2*Title_Length)+Norm$ Itemp=Ident_Length/2 ! Fill_Length=Title_Length -Itemp ! Ipos=41-Ilength/2 ! Where to insert process name Blank_Line$=Rvid$+SPACE$(Fill_Length)+Ident$ ! Insert Ident ! IF 2*(Itemp) < Ident_Length THEN ! Compensate for odd length Blank_Line$=Blank_Line$+SPACE$(Fill_Length-1)+Norm$! ident strings ELSE ! Blank_Line$=Blank_Line$+SPACE$(Fill_Length)+Norm$ ! END IF ! ! TitleU$=DblU$+Rvid$+" "+Norm$+" "+Title$+" "+Norm$+Rvid$+" "+Norm$ TitleL$=DblL$+Rvid$+" "+Norm$+" "+Title$+" "+Norm$+Rvid$+" "+Norm$ PRINT Pre_Fill$;Pre_Fill$;Blank_LineL$ ! PRINT ESC$;"[1;";STR$(Ipos);"H";Process$ PRINT Pre_Fill$;TitleU$ PRINT Pre_Fill$;TitleL$ PRINT Pre_Fill$;Pre_Fill$;Blank_line$ Esc_char=8 ! 8 extra char for bold ^Y ELSE ! Title_Length=LEN(Title$) ! Bold$="" ! Norm$="" ! Pre_Fill=(80-Title_Length)/2 ! # of prefill spaces Pre_Fill$=SPACE$(Pre_Fill) ! PRINT Pre_Fill$;Title$ ! Esc_char=0 ! END IF ! Msg$="(Type "+Bold$+"^Y"+Norm$+" to exit at any point)" Pre_Fill=(80-LEN(Msg$)+Esc_char)/2 ! Pre_Fill$=SPACE$(Pre_Fill) ! PRINT IF Terminal_Type >=96 ! PRINT Pre_Fill$;Msg$ ! PRINT IF Terminal_Type <96 ! Stick in blank line END SUB !