Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!rutgers!ames!ucbcad!ucbvax!arc.CDN!perkins From: perkins@arc.CDN (Ernie Perkins) Newsgroups: comp.os.vms Subject: Some changes to SWING Message-ID: <94*perkins@arc.cdn> Date: Tue, 25-Aug-87 04:33:54 EDT Article-I.D.: arc.94*perkins Posted: Tue Aug 25 04:33:54 1987 Date-Received: Wed, 26-Aug-87 04:46:11 EDT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The ARPA Internet Lines: 259 I have found the latest swing.com to be a very useful utility, but have made some changes. I've included the 2 most useful of these below - if using a terminal with a different screen length than a VT.... takes advantage of the fact. - from a version posted to the net by Michael Bednarek, use the symbol SWING_SAVE to point to the directory where the save is stored - allow and a few other keys to exit out in the directory. If you are customizing your version, I would suggest moving FILER into the top level menu, it is a lot more useful. Ernie Perkins alias "der Schrumpfschluch" +----------------------------------------------------------------------------+ | E.H. Perkins, CSNET perkins%arc.cdn@ubc.csnet | | Alberta Research Council, MTSNET perkins%arc.cdn@alberta | | Oil Sands Research Dept., UUCP ...!alberta!arc.cdn!perkins | | PO Box 8330, Postal Station F, ARPA perkins%arc.cdn%ubc.csnet@relay.cs.net | | Edmonton, Alberta, Canada | | T6H 5X2 | | | | Voice: (403) 464-9212 alternate bitnet: userehp@UBCMTSG | | Telex: 037-2147 alternate bitnet: usertcak@UALTAMTS | +----------------------------------------------------------------------------+ | The views expressed herein reflect my own interests, prejudices, | | misconceptions and ignorance. When the truth is known, they are probably | | incorrect. They do not necessarily reflect the views of my employers who | | have their own unique set of interests, prejudices and misconceptions. | +----------------------------------------------------------------------------+ **************** ****************in define_paste_board **************** File USERS:[PERKINS.SWING.NEW_VERSION.NET_SOURCE_NEW]2.FOR;1 486 record /smgdef/ table ****** File USERS:[PERKINS.SWING.NEW_VERSION]2.FOR;8 486 C 487 C Q and D fix to cope with strange terminal screen lengths 488 C Added by EH Perkins, Aug 16, 1987 489 C 490 integer linest 491 common /length/ linest 492 493 record /smgdef/ table ************ ************ File USERS:[PERKINS.SWING.NEW_VERSION.NET_SOURCE_NEW]2.FOR;1 490 istat = smg$create_pasteboard( board_id ) 491 ****** File USERS:[PERKINS.SWING.NEW_VERSION]2.FOR;8 497 istat = smg$create_pasteboard( board_id,,linest) ! linest added 498 C by EHP 499 ************ ************in delete_file ************ File USERS:[PERKINS.SWING.NEW_VERSION.NET_SOURCE_NEW]2.FOR;1 709 call smg$read_string( keyboard, string, 710 . 'Enter YES to delete this file: ', 711 . ,,,,len_string,, window3 ) 712 call str$upcase( string, string ) ****** File USERS:[PERKINS.SWING.NEW_VERSION]2.FOR;8 734 C 735 C Call to smg$read_string changed from 736 C . ,,,,len_string,, window3 ) 737 C to 738 C . 3,,,,len_string,, window3 ) 739 C so it is the same as the delete node confirmation. 740 C 741 C EH Perkins Aug 16, 1987 742 C 743 call smg$read_string( keyboard, string, 744 . 'Enter YES to delete this file: ', 745 . 3,,,,len_string,, window3 ) 746 call str$upcase( string, string ) ************ DIFFERENCES /IGNORE=()/MERGED=1/OUTPUT=USERS:[PERKINS.SWING.NEW_VERSION.NET_SOURCE_NEW]2.DIF;1- USERS:[PERKINS.SWING.NEW_VERSION.NET_SOURCE_NEW]2.FOR;1- USERS:[PERKINS.SWING.NEW_VERSION]2.FOR;8 ************ ************in draw_screen ************ File USERS:[PERKINS.SWING.NEW_VERSION.NET_SOURCE_NEW]3.FOR;1 74 75 integer ii, jj, kk, smg$change_pbd_characteristics ****** File USERS:[PERKINS.SWING.NEW_VERSION]3.FOR;7 74 C 75 C To cope with strange terminal screen lengths 76 C 19 --- > linest - 5 77 C 20 --- > linest - 4 78 C 23 --- > linest - 1 79 C 80 C 81 C Added by EH Perkins, Aug 16, 1987 82 C 83 84 integer linest 85 common /length/ linest 86 87 integer ii, jj, kk, smg$change_pbd_characteristics ************ ************ File USERS:[PERKINS.SWING.NEW_VERSION.NET_SOURCE_NEW]3.FOR;1 82 call smg$paste_virtual_display( window3, board_id, 23, 1 ) 83 ****** File USERS:[PERKINS.SWING.NEW_VERSION]3.FOR;7 94 call smg$paste_virtual_display( window3, board_id, 95 . (linest - 1), 1 ) 96 ************ ************ File USERS:[PERKINS.SWING.NEW_VERSION.NET_SOURCE_NEW]3.FOR;1 89 bottom_line = 20 90 ****** File USERS:[PERKINS.SWING.NEW_VERSION]3.FOR;7 102 bottom_line = (linest - 4) 103 ************ ************ File USERS:[PERKINS.SWING.NEW_VERSION.NET_SOURCE_NEW]3.FOR;1 98 top_line = cur_line - 19 99 bottom_line = cur_line 100 call smg$move_virtual_display( window2, board_id, 101 . 23 - cur_line, 1 ) 102 else if ( cur_line .lt. top_line ) then 103 top_line = cur_line 104 bottom_line = cur_line + 19 105 call smg$move_virtual_display( window2, board_id, ****** File USERS:[PERKINS.SWING.NEW_VERSION]3.FOR;7 111 top_line = cur_line - (linest - 5) 112 bottom_line = cur_line 113 call smg$move_virtual_display( window2, board_id, 114 . (linest - 1) - cur_line, 1 ) 115 else if ( cur_line .lt. top_line ) then 116 top_line = cur_line 117 bottom_line = cur_line + (linest - 5) 118 call smg$move_virtual_display( window2, board_id, ************ ************in load_nodes ************ File USERS:[PERKINS.SWING.NEW_VERSION.NET_SOURCE_NEW]3.FOR;1 670 do ii = 1, MAX_LINES ****** File USERS:[PERKINS.SWING.NEW_VERSION]3.FOR;7 683 integer*4 lib$sys_trnlog, lTR ! added to allow 684 character TR*255 ! swing_save to 685 ! be used 686 687 do ii = 1, MAX_LINES ************ ************ File USERS:[PERKINS.SWING.NEW_VERSION.NET_SOURCE_NEW]3.FOR;1 734 ii = 0 735 if ( .not. update .and. lib$find_file( main(1:len_main)// ****** File USERS:[PERKINS.SWING.NEW_VERSION]3.FOR;7 750 C Stolen from a version posted by Michael Bednarek .... 751 ! Create a file name for the save file 752 ! The rationale behind this is that I don't want to write the 753 ! SWING.SAV file into other users' directories. 754 ! If the logical name SWING_SAVE exists, 755 756 If (LIB$SYS_TRNLOG('SWING_SAVE',lTR,TR,,,%VAL(0)).eq.1) then 757 main(1:len_main+10)='SWING_SAVE:'//main(2:len_main-1)//'_' 758 len_main=len_main+10 759 End If 760 761 ii = 0 762 if ( .not. update .and. lib$find_file( main(1:len_main)// ************ DIFFERENCES /IGNORE=()/MERGED=1/OUTPUT=USERS:[PERKINS.SWING.NEW_VERSION.NET_SOURCE_NEW]3.DIF;1- USERS:[PERKINS.SWING.NEW_VERSION.NET_SOURCE_NEW]3.FOR;1- USERS:[PERKINS.SWING.NEW_VERSION]3.FOR;7 ************ ************in show_files ************ File USERS:[PERKINS.SWING.NEW_VERSION.NET_SOURCE_NEW]5.FOR;1 611 . code .eq. 181 ) then ****** File USERS:[PERKINS.SWING.NEW_VERSION]5.FOR;13 614 . ikey .eq. smg$k_trm_lowercase_x .or. 615 . ikey .eq. smg$k_trm_uppercase_x .or. 616 . ikey .eq. smg$k_trm_ctrlz .or. 617 . code .eq. 181 ) then ************ ************ File USERS:[PERKINS.SWING.NEW_VERSION.NET_SOURCE_NEW]5.FOR;1 785 . ikey .eq. smg$k_trm_enter .or. 786 . code .eq. 91 ) then 787 finished = .true. ****** File USERS:[PERKINS.SWING.NEW_VERSION]5.FOR;13 799 . ikey .eq. smg$k_trm_lowercase_q .or. 800 . ikey .eq. smg$k_trm_uppercase_q .or. 801 . ikey .eq. smg$k_trm_enter .or. 802 . ikey .eq. smg$k_trm_cr .or. 803 . code .eq. 91 ) then 804 finished = .true. ************ ************ ************in program swing ************ File USERS:[PERKINS.SWING.NEW_VERSION.NET_SOURCE_NEW]5.FOR;1 984 ****** File USERS:[PERKINS.SWING.NEW_VERSION]5.FOR;13 1011 C 1012 C To cope with strange terminal screen lengths 1013 C 19 --- > lenest - 5 1014 C 23 --- > lenest - 1 1015 C 1016 C Added by EH Perkins, Aug 16, 1987 1017 C 1018 1019 integer linest 1020 common /length/ linest 1021 ************ ************ File USERS:[PERKINS.SWING.NEW_VERSION.NET_SOURCE_NEW]5.FOR;1 1004 call smg$move_virtual_display( window2, board_id,23-ii,1) 1005 end do 1006 top_line = cur_line - 19 1007 bottom_line = cur_line ****** File USERS:[PERKINS.SWING.NEW_VERSION]5.FOR;13 1041 call smg$move_virtual_display( window2, board_id, 1042 . (linest - 1)-ii,1) 1043 end do 1044 top_line = cur_line - (linest - 5) 1045 bottom_line = cur_line ************ ************ File USERS:[PERKINS.SWING.NEW_VERSION.NET_SOURCE_NEW]5.FOR;1 1014 bottom_line = cur_line + 19 1015 end if ****** File USERS:[PERKINS.SWING.NEW_VERSION]5.FOR;13 1052 bottom_line = cur_line + (linest - 5) 1053 end if ************ DIFFERENCES /IGNORE=()/MERGED=1/OUTPUT=USERS:[PERKINS.SWING.NEW_VERSION.NET_SOURCE_NEW]5.DIF;1- USERS:[PERKINS.SWING.NEW_VERSION.NET_SOURCE_NEW]5.FOR;1- USERS:[PERKINS.SWING.NEW_VERSION]5.FOR;13