home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Source Code 1992 March
/
Source_Code_CD-ROM_Walnut_Creek_March_1992.iso
/
usenet
/
altsrcs
/
3
/
3982
< prev
next >
Wrap
Internet Message Format
|
1991-09-08
|
15KB
Path: wupost!uunet!europa.asd.contel.com!darwin.sura.net!noc.sura.net!haven.umd.edu!mimsy!nrlvx1.nrl.navy.mil!koffley
From: koffley@nrlvx1.nrl.navy.mil
Newsgroups: alt.sources
Subject: VMS UAF PROFILE part 8 of 18
Message-ID: <1991Sep5.074429.552@nrlvx1.nrl.navy.mil>
Date: 5 Sep 91 11:44:29 GMT
Organization: NRL SPACE SYSTEMS DIVISION
Lines: 390
-+-+-+-+-+-+-+-+ START OF PART 8 -+-+-+-+-+-+-+-+
X call smg$paste_virtual_display ( access_board, pasteboard, 1,1 )
X call smg$paste_virtual_display ( message, pasteboard, 22, 1 )
X call smg$end_pasteboard_update ( pasteboard )
X call smg$set_cursor_abs ( access_board, line, col )
XC
XC Read a keystroke and loop until an exit is called
XC
X do while (bogus_key)
X call smg$read_keystroke ( keyboard, term )
XC
XC Right arrow, or letter 'l' - right to next field
XC
X if (term.eq.smg$k_trm_right.or.
X . term.eq.smg$k_trm_uppercase_l.or.
X . term.eq.smg$k_trm_lowercase_l) then
X if (line.eq.9.and.col.eq.70) then
X line = 5
X col = 11
X elseif (col.eq.34) then
X col = 47
X elseif (line.ne.9.and.col.eq.70) then
X line = line + 1
X col = 11
X else
X col = col + 1
X endif
X call smg$set_cursor_abs ( access_board, line, col )
XC
XC Left arrow, or letter 'h' - left to previous field
XC
X elseif (term.eq.smg$k_trm_left.or.
X . term.eq.smg$k_trm_uppercase_h.or.
X . term.eq.smg$k_trm_lowercase_h) then
X if (line.eq.5.and.col.eq.11) then
X line = 9
X col = 70
X elseif (line.ne.5.and.col.eq.11) then
X line = line - 1
X col = 70
X elseif (col.eq.47) then
X col = 34
X else
X col = col - 1
X endif
X call smg$set_cursor_abs ( access_board, line, col )
XC
XC Up arrow, or letter 'k' - up to previous field
XC
X elseif (term.eq.smg$k_trm_up.or.
X . term.eq.smg$k_trm_uppercase_k.or.
X . term.eq.smg$k_trm_lowercase_k) then
X if (line.eq.5) then
X line = 9
X else
X line = line - 1
X endif
X call smg$set_cursor_abs ( access_board, line, col )
XC
XC Down arrow, or Carriage Return, or letter 'j' - down to next field
XC
X elseif (term.eq.smg$k_trm_down.or.
X . term.eq.smg$k_trm_cr.or.
X . term.eq.smg$k_trm_uppercase_j.or.
X . term.eq.smg$k_trm_lowercase_j) then
X if (line.eq.9) then
X line = 5
X else
X line = line + 1
X endif
X call smg$set_cursor_abs ( access_board, line, col )
XC
XC Plus (+) key, or Insert Here key, to allow full access to field
XC
X elseif (term.eq.smg$k_trm_plus_sign.or.
X . term.eq.smg$k_trm_insert_here) then
X change = .true.
X if (line.eq.5.and.col.lt.35) then
X call clr_bits ( network_p )
X access_flag = 'Network:'
X call find_access ( access_flag, line,
X . network_p, network_s )
X elseif (line.eq.5.and.col.gt.35) then
X call clr_bits ( network_s )
X access_flag = 'Network:'
X call find_access ( access_flag, line,
X . network_p, network_s )
X endif
X if (line.eq.6.and.col.lt.35) then
X call clr_bits ( batch_p )
X access_flag = 'Batch:'
X call find_access ( access_flag, line,
X . batch_p, batch_s )
X elseif (line.eq.6.and.col.gt.35) then
X call clr_bits ( batch_s )
X access_flag = 'Batch:'
X call find_access ( access_flag, line,
X . batch_p, batch_s )
X endif
X if (line.eq.7.and.col.lt.35) then
X call clr_bits ( local_p )
X access_flag = 'Local:'
X call find_access ( access_flag, line,
X . local_p, local_s )
X elseif (line.eq.7.and.col.gt.35) then
X call clr_bits ( local_s )
X access_flag = 'Local:'
X call find_access ( access_flag, line,
X . local_p, local_s )
X endif
X if (line.eq.8.and.col.lt.35) then
X call clr_bits ( dialup_p )
X access_flag = 'Dialup:'
X call find_access ( access_flag, line,
X . dialup_p, dialup_s )
X elseif (line.eq.8.and.col.gt.35) then
X call clr_bits ( dialup_s )
X access_flag = 'Dialup:'
X call find_access ( access_flag, line,
X . dialup_p, dialup_s )
X endif
X if (line.eq.9.and.col.lt.35) then
X call clr_bits ( remote_p )
X access_flag = 'Remote:'
X call find_access ( access_flag, line,
X . remote_p, remote_s )
X elseif (line.eq.9.and.col.gt.35) then
X call clr_bits ( remote_s )
X access_flag = 'Remote:'
X call find_access ( access_flag, line,
X . remote_p, remote_s )
X endif
X call smg$set_cursor_abs ( access_board, line, col )
XC
XC Minus (-) key, or Remove key, to disallow access to field
XC
X elseif (term.eq.smg$k_trm_dash.or.
X . term.eq.smg$k_trm_remove) then
X change = .true.
X if (line.eq.5.and.col.lt.35) then
X call set_bits ( network_p )
X access_flag = 'Network:'
X call find_access ( access_flag, line,
X . network_p, network_s )
X elseif (line.eq.5.and.col.gt.35) then
X call set_bits ( network_s )
X access_flag = 'Network:'
X call find_access ( access_flag, line,
X . network_p, network_s )
X endif
X if (line.eq.6.and.col.lt.35) then
X call set_bits ( batch_p )
X access_flag = 'Batch:'
X call find_access ( access_flag, line,
X . batch_p, batch_s )
X elseif (line.eq.6.and.col.gt.35) then
X call set_bits ( batch_s )
X access_flag = 'Batch:'
X call find_access ( access_flag, line,
X . batch_p, batch_s )
X endif
X if (line.eq.7.and.col.lt.35) then
X call set_bits ( local_p )
X access_flag = 'Local:'
X call find_access ( access_flag, line,
X . local_p, local_s )
X elseif (line.eq.7.and.col.gt.35) then
X call set_bits ( local_s )
X access_flag = 'Local:'
X call find_access ( access_flag, line,
X . local_p, local_s )
X endif
X if (line.eq.8.and.col.lt.35) then
X call set_bits ( dialup_p )
X access_flag = 'Dialup:'
X call find_access ( access_flag, line,
X . dialup_p, dialup_s )
X elseif (line.eq.8.and.col.gt.35) then
X call set_bits ( dialup_s )
X access_flag = 'Dialup:'
X call find_access ( access_flag, line,
X . dialup_p, dialup_s )
X endif
X if (line.eq.9.and.col.lt.35) then
X call set_bits ( remote_p )
X access_flag = 'Remote:'
X call find_access ( access_flag, line,
X . remote_p, remote_s )
X elseif (line.eq.9.and.col.gt.35) then
X call set_bits ( remote_s )
X access_flag = 'Remote:'
X call find_access ( access_flag, line,
X . remote_p, remote_s )
X endif
X call smg$set_cursor_abs ( access_board, line, col )
XC
XC Select key, or keypad period (.) key, to toggle edit mode
XC
X elseif (term.eq.smg$k_trm_select.or.
X . term.eq.smg$k_trm_period) then
X change = .true.
X call read_hours ( line, col, access_flag )
X call smg$set_cursor_abs ( access_board, line, col )
XC
XC PF1 - access flags display
XC
X elseif (term.eq.smg$k_trm_pf1) then
X call smg$unpaste_virtual_display ( access_board,
X . pasteboard )
X call show_flags ( owner, tables, defcli, defdev,
X . defdir, lgicmd )
X bogus_key = .false.
XC
XC PF2 - primary and secondary days display
XC
X elseif (term.eq.smg$k_trm_pf2) then
X call smg$unpaste_virtual_display ( access_board,
X . pasteboard )
X call show_days ( owner, tables, defcli, defdev,
X . defdir, lgicmd )
X bogus_key = .false.
XC
XC PF4 - privilege display
XC
X elseif (term.eq.smg$k_trm_pf4) then
X call smg$unpaste_virtual_display ( access_board,
X . pasteboard )
X call show_privs ( owner, tables, defcli, defdev,
X . defdir, lgicmd )
X bogus_key = .false.
XC
XC CtrlW - repaint screen
XC
X elseif (term.eq.smg$k_trm_ctrlw) then
X call smg$repaint_screen ( pasteboard )
XC
XC CtrlZ - exit to main display
XC
X elseif (term.eq.smg$k_trm_ctrlz) then
X bogus_key = .false.
X endif
X enddo
XC
XC Unpaste the virtual display.
XC
X call smg$unpaste_virtual_display ( access_board, pasteboard )
X
X end
X
XC************************************************************************
X
X Subroutine FIND_ACCESS ( access_flag, line, check1, check2 )
XC
XC The purpose of this subroutine is to determine the hourly access times
XC for the type of login specified. Check1 and Check2 are checked to see
XC if bits are set (meaning no access) or not set (meaning access allowed).
XC The appropriate character ('-' for noaccess and '#' for access) is put
XC to the display.
XC
X Include 'uaf.cmn'
X Include '($smgdef)'
X Integer*4 check1, check2
X Integer*4 line, col
X Character*(*) access_flag
XC
XC Begin the pasteboard update.
XC
X call smg$begin_pasteboard_update ( pasteboard )
X call smg$put_chars ( access_board, access_flag, line, 1 )
X
X col = 11
XC
XC '-' means no access allowed. '#' means access is allowed.
XC
X do i = 0,23
X if (btest(check1,i)) then
X call smg$put_chars ( access_board, '-', line, col )
X else
X call smg$put_chars ( access_board, '#', line, col )
X endif
X col = col + 1
X enddo
X
X col = 47
X
X do i = 0,23
X if (btest(check2,i)) then
X call smg$put_chars ( access_board, '-', line, col )
X else
X call smg$put_chars ( access_board, '#', line, col )
X endif
X col = col + 1
X enddo
XC
XC End the pasteboard update.
XC
X call smg$end_pasteboard_update ( pasteboard )
X
X end
X
XC***************************************************************
X
X Subroutine READ_HOURS ( line, col, access_flag )
XC
XC The purpose of this subroutine is to allow the user to pick the
XC hours for which access will be allowed or denied. The select key
XC starts the selection and another select will mark the end of the
XC select region. Whatever access restrictions that were in effect
XC will be reversed.
XC
X Include 'uaf.cmn'
X Include '($smgdef)'
X Integer*4 line, col, col_equiv(70)
X Integer*4 access1, access2, access_type
X Character*1 char
X Character*(*) access_flag
X
X data col_equiv
X . /0,0,0,0,0,0,0,0,0,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,
X . 17,18,19,20,21,22,23,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,4,5,6,7,
X . 8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23/
X bogus_key = .true.
XC
XC Create instructions window and paste it to the board
XC
X call smg$create_virtual_display ( 3, 65, instruct,
X . smg$m_border )
X call smg$put_chars ( instruct, ' Move cursor to desired location
X . and press SELECT when finished', 2, 1 )
X call smg$paste_virtual_display ( instruct, pasteboard, 15, 5 )
X call smg$set_cursor_abs ( access_board, line, col )
X
X if (line.eq.5) then
X access_flag = 'Network:'
X access1 = network_p
X access2 = network_s
X if (col.lt.35) access_type = network_p
X if (col.gt.35) access_type = network_s
X elseif (line.eq.6) then
X access_flag = 'Batch:'
X access1 = batch_p
X access2 = batch_s
X if (col.lt.35) access_type = batch_p
X if (col.gt.35) access_type = batch_s
X elseif (line.eq.7) then
X access_flag = 'Local:'
X access1 = local_p
X access2 = local_s
X if (col.lt.35) access_type = local_p
X if (col.gt.35) access_type = local_s
X elseif (line.eq.8) then
X access_flag = 'Dialup:'
X access1 = dialup_p
X access2 = dialup_s
X if (col.lt.35) access_type = dialup_p
X if (col.gt.35) access_type = dialup_s
X elseif (line.eq.9) then
X access_flag = 'Remote:'
X access1 = remote_p
X access2 = remote_s
X if (col.lt.35) access_type = remote_p
X if (col.gt.35) access_type = remote_s
X endif
XC
XC Loop until the select key is hit again to terminate selection.
XC
X do while (bogus_key)
X call smg$read_from_display ( access_board, char )
X if (char.eq.'-') then
X call lib$bbcci ( col_equiv(col), access_type )
X elseif (char.eq.'#') then
X call lib$bbssi ( col_equiv(col), access_type )
X endif
X call smg$read_keystroke ( keyboard, term )
X if (term.eq.smg$k_trm_select.or.
X . term.eq.smg$k_trm_period) bogus_key = .false.
X if (term.eq.smg$k_trm_right) then
X if (col.ne.34.and.col.ne.70) col = col + 1
X endif
X call smg$set_cursor_abs ( access_board, line, col )
X enddo
X
X if (col.lt.35) access1 = access_type
+-+-+-+-+-+-+-+- END OF PART 8 +-+-+-+-+-+-+-+-
--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
< Joe Koffley KOFFLEY@NRLVAX.NRL.NAVY.MIL >
< Naval Research Laboratory KOFFLEY@CCF.NRL.NAVY.MIL >
< Space Systems Division AT&T : 202-767-0894 >
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/