home *** CD-ROM | disk | FTP | other *** search
- 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 9 of 18
- Message-ID: <1991Sep5.074454.553@nrlvx1.nrl.navy.mil>
- Date: 5 Sep 91 11:44:54 GMT
- Organization: NRL SPACE SYSTEMS DIVISION
- Lines: 451
-
- -+-+-+-+-+-+-+-+ START OF PART 9 -+-+-+-+-+-+-+-+
- X if (col.gt.35) access2 = access_type
- XC
- XC Get rid of the instructions window.
- XC
- X call smg$unpaste_virtual_display ( instruct, pasteboard )
- XC
- XC Update the screen with the new access information
- XC
- X if (line.eq.5) then
- X if (col.lt.35) network_p = access1
- X if (col.gt.35) network_s = access2
- X call find_access ( access_flag, line, network_p,
- X . network_s )
- X elseif (line.eq.6) then
- X if (col.lt.35) batch_p = access1
- X if (col.gt.35) batch_s = access2
- X call find_access ( access_flag, line, batch_p, batch_s )
- X elseif (line.eq.7) then
- X if (col.lt.35) local_p = access1
- X if (col.gt.35) local_s = access2
- X call find_access ( access_flag, line, local_p, local_s )
- X elseif (line.eq.8) then
- X if (col.lt.35) dialup_p = access1
- X if (col.gt.35) dialup_s = access2
- X call find_access ( access_flag, line, dialup_p, dialup_s )
- X elseif (line.eq.9) then
- X if (col.lt.35) remote_p = access1
- X if (col.gt.35) remote_s = access2
- X call find_access ( access_flag, line, remote_p, remote_s )
- X endif
- X
- X end
- X
- XC************************************************************************
- X
- X Subroutine SET_BITS ( access_type )
- XC
- XC The purpose of this subroutine is to deny complete access to a
- XC particular field.
- XC
- X Include 'uaf.cmn'
- X Integer*4 access_type, i
- X
- X do i = 0,23
- X call lib$bbssi ( i, access_type )
- X enddo
- X
- X end
- X
- XC************************************************************************
- X
- X Subroutine CLR_BITS ( access_type )
- XC
- XC The purpose of this subroutine is to grant complete access to a
- XC particular field.
- XC
- X Include 'uaf.cmn'
- X Integer*4 access_type, i
- X
- X do i = 0,23
- X call lib$bbcci ( i, access_type )
- X enddo
- X
- X end
- X
- XC************************************************************************
- X
- X Subroutine SHOW_DAYS ( owner, tables, defcli, defdev,
- X . defdir, lgicmd )
- XC
- XC The purpose of this subroutine is to paste the primary and secondary
- XC days to the screen and allow movement of the cursor to the desired
- XC field for enabling or disabling of the days.
- XC
- X Include 'uaf.cmn'
- X Include '($smgdef)'
- X Integer*4 i, line, col
- X Character*25 string
- X Character*16 day_names(7)
- X Character*(*) owner, tables, defcli, defdev, defdir, lgicmd
- X
- X data day_names
- X . /'Monday ','Tuesday ','Wednesday ',
- X . 'Thursday ','Friday ','Saturday ',
- X . 'Sunday ' /
- X
- X bogus_key = .true.
- X line = 5
- X col = 10
- XC
- XC Begin creating the virtual display.
- XC
- X call smg$begin_pasteboard_update ( pasteboard )
- X call smg$erase_display ( message )
- X call smg$put_chars ( days_board,
- X . ' Primary and Secondary Days: ',
- X . 1, 24 ,, smg$m_bold )
- X call smg$put_chars ( days_board, ' Primary Days ', 3, 10 ,,
- X . smg$m_reverse )
- X call smg$put_chars ( days_board, ' Secondary Days ', 3, 45 ,,
- X . smg$m_reverse )
- XC
- XC write the days to the board
- XC
- X do i = 1,7
- X call smg$put_chars ( days_board, day_names(i), line, col )
- X col = col + 35
- X call smg$put_chars ( days_board, day_names(i), line, col )
- X line = line + 1
- X col = 10
- X enddo
- XC
- XC Call the subroutine SCAN_DAYS to determine the primary and
- XC secondary days.
- XC
- X call scan_days
- XC
- XC Reset the values for line and column.
- XC
- X line = 5
- X col = 10
- XC
- XC Write the instructions into the message window.
- XC
- X call smg$put_chars ( message,
- X . 'Use arrow keys to move to desired field.', 1, 2 )
- X call smg$put_chars ( message,
- X . 'Hit SELECT, PERIOD, or T to change primary or secondary day.',
- X . 2, 2 )
- X call smg$put_chars ( message,
- X . 'PF keys: go to another screen.
- X . ControlZ: exit to main display.',
- X . 3, 2 )
- XC
- XC Paste the virtual displays to the screen, end the pasteboard update,
- XC and set the cursor to the first position.
- XC
- X call smg$paste_virtual_display ( days_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 ( days_board, line, col )
- XC
- XC Read a keystroke. Loop until terminator (ctrlZ) is pressed.
- XC
- X do while (bogus_key)
- X call smg$read_keystroke ( keyboard, term )
- XC
- XC Right arrow, or letter 'l' - move to next field to the right
- 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.11.and.col.eq.45) then
- X line = 5
- X col = 10
- X elseif (col.eq.10) then
- X col = 45
- X elseif (col.eq.45) then
- X line = line + 1
- X col = 10
- X endif
- X call smg$set_cursor_abs ( days_board, line, col )
- XC
- XC Left arrow, or letter 'h' - move to previous field to the left
- 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.10) then
- X line = 11
- X col = 45
- X elseif (col.eq.10) then
- X line = line - 1
- X col = 45
- X elseif (col.eq.45) then
- X col = 10
- X endif
- X call smg$set_cursor_abs ( days_board, line, col )
- XC
- XC Down arrow, or carriage return, or letter 'j' - move to next field below
- 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.11) then
- X line = 5
- X else
- X line = line + 1
- X endif
- X call smg$set_cursor_abs ( days_board, line, col )
- XC
- XC Up arrow, or letter 'k' - move to previous field above
- 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 = 11
- X else
- X line = line - 1
- X endif
- X call smg$set_cursor_abs ( days_board, line, col )
- XC
- XC Select or keypad period (.) key - enter edit mode
- XC
- X elseif (term.eq.smg$k_trm_select.or.
- X . term.eq.smg$k_trm_period.or.
- X . term.eq.smg$k_trm_uppercase_t.or.
- X . term.eq.smg$k_trm_lowercase_t) then
- X change = .true.
- X call smg$read_from_display ( days_board, string )
- X call read_days ( string(1:16) )
- XC
- XC PF1 - go to flags screen
- XC
- X elseif (term.eq.smg$k_trm_pf1) then
- X call smg$unpaste_virtual_display ( days_board,
- X . pasteboard )
- X call show_flags ( owner, tables, defcli, defdev,
- X . defdir, lgicmd )
- X bogus_key = .false.
- XC
- XC PF3 - go to access times screen
- XC
- X elseif (term.eq.smg$k_trm_pf3) then
- X call smg$unpaste_virtual_display ( days_board,
- X . pasteboard )
- X call show_access ( owner, tables, defcli, defdev,
- X . defdir, lgicmd )
- X bogus_key = .false.
- XC
- XC PF4 - go to privilege screen
- XC
- X elseif (term.eq.smg$k_trm_pf4) then
- X call smg$unpaste_virtual_display ( days_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 screen
- XC
- X elseif (term.eq.smg$k_trm_ctrlz) then
- X bogus_key = .false.
- X endif
- X enddo
- X
- X call smg$unpaste_virtual_display ( days_board, pasteboard )
- X
- X end
- X
- XC************************************************************************
- X
- X Subroutine READ_DAYS ( day )
- XC
- XC The purpose of this subroutine is to read the day at the cursor and
- XC reverse the mode.
- XC
- X Include 'uaf.cmn'
- X Include '($smgdef)'
- X Include '($uaidef)'
- X Integer*4 i, day_types(7)
- X Character*16 day_names(7)
- X Character*(*) day
- X
- X data day_types
- X . / uai$v_monday, uai$v_tuesday, uai$v_wednesday,
- X . uai$v_thursday, uai$v_friday, uai$v_saturday,
- X . uai$v_sunday /
- X
- X data day_names
- X . /'Monday ','Tuesday ','Wednesday ',
- X . 'Thursday ','Friday ','Saturday ',
- X . 'Sunday ' /
- XC
- XC Set the primary or secondary day accordingly.
- XC
- X do i = 1,7
- X if (day.eq.day_names(i)) then
- X if (btest(prime,day_types(i))) then
- X call lib$bbcci ( day_types(i), prime )
- X else
- X call lib$bbssi ( day_types(i), prime )
- X endif
- X endif
- X enddo
- XC
- XC Call subroutine SCAN_DAYS to determine new values.
- XC
- X call scan_days
- X
- X end
- X
- XC************************************************************************
- X
- X Subroutine SCAN_DAYS
- XC
- XC The purpose of this subroutine is to determine which days are
- XC primary or secondary and set the video rendition accordingly.
- XC
- X Include 'uaf.cmn'
- X Include '($smgdef)'
- X Include '($uaidef)'
- X Integer*4 i, line, rend_mask, day_types(7)
- X
- X data day_types
- X . / uai$v_monday, uai$v_tuesday, uai$v_wednesday,
- X . uai$v_thursday, uai$v_friday, uai$v_saturday,
- X . uai$v_sunday /
- X
- X rend_mask = smg$m_bold.or.smg$m_underline
- X line = 5
- X
- X call smg$begin_pasteboard_update ( pasteboard )
- XC
- XC Find out what the primary and secondary days are for the user
- XC
- X do i = 1,7
- X if (btest(prime,day_types(i))) then
- X call smg$change_rendition ( days_board, line, 10,
- X . 1, 16, 0 )
- X call smg$change_rendition ( days_board, line, 45,
- X . 1, 16, rend_mask )
- X else
- X call smg$change_rendition ( days_board, line, 10,
- X . 1, 16, rend_mask )
- X call smg$change_rendition ( days_board, line, 45,
- X . 1, 16, 0 )
- X endif
- X line = line + 1
- X enddo
- X
- X call smg$end_pasteboard_update ( pasteboard )
- X
- X end
- X
- XC************************************************************************
- X
- X Subroutine SHOW_FLAGS ( owner, tables, defcli, defdev,
- X . defdir, lgicmd )
- XC
- XC The purpose of this subroutine is to paste the login flags to
- XC the board and allow moving of the cursor to the desired field
- XC in order to enable or disable a particular flag.
- XC
- X Include 'uaf.cmn'
- X Include '($smgdef)'
- X Integer*4 line, col, i, j
- X Character*25 string
- X Character*12 flag_names(18)
- X Character*(*) owner, tables, defcli, defdev, defdir, lgicmd
- X
- X data flag_names
- X . /'Audit ','Restricted ','Defcli ',
- X . 'Disctly ','Disnewmail ','Disreconnect',
- X . 'Disreport ','Diswelcome ','Genpwd ',
- X . 'Lockpwd ','Dismail ','Disuser ',
- X . 'Autolog ','Pwdexpired ','Pwd2_expired',
- X . 'Disforce_pwd','Captive ','Disimage '/
- X
- X bogus_key = .true.
- X line = 3
- XC
- XC Begin creating the board.
- XC
- X call smg$begin_pasteboard_update ( pasteboard )
- X call smg$erase_display ( message )
- X call smg$put_chars ( flags_board, ' Login Flags: ',
- X . 1, 33 ,, smg$m_bold )
- X
- X col = 25
- XC
- XC put all flag names to the screen
- XC
- X do j = 1,18,2
- X do i = j,j+1
- X call smg$put_chars ( flags_board, flag_names(i),
- X . line, col )
- X col = col + 25
- X enddo
- X line = line + 1
- X col = 25
- X enddo
- X
- X line = line - 1
- XC
- XC Call the subroutine SCAN_FLAG to determine which flags are enabled.
- XC
- X call scan_flag
- XC
- XC Reset line and column values.
- XC
- X line = 3
- X col = 25
- XC
- XC Write instructions to the message window
- XC
- X call smg$put_chars ( message,
- X . 'Use arrow keys to move to desired field.', 1, 2 )
- X call smg$put_chars ( message,
- X . 'Hit SELECT, PERIOD, or T to change flag.', 2, 2 )
- X call smg$put_chars ( message,
- X . 'PF keys: go to another screen.
- X . ControlZ: exit to main display.',
- X . 3, 2 )
- XC
- XC Paste virtual displays, end the pasteboard update, and set the cursor
- XC to the first position
- XC
- X call smg$paste_virtual_display ( flags_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 ( flags_board, line, col )
- XC
- XC Read a keystroke. Loop until terminator key is hit (ctrlZ).
- XC
- X do while (bogus_key)
- X call smg$read_keystroke ( keyboard, term )
- XC
- XC Right arrow, or letter 'l' - move to next field at right
- 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.11.and.col.eq.50) then
- X line = 3
- X col = 25
- X elseif (col.eq.50) then
- X line = line + 1
- X col = 25
- X elseif (col.eq.25) then
- X col = 50
- X endif
- X call smg$set_cursor_abs ( flags_board, line, col )
- XC
- XC Left arrow, or letter 'h' - move to previous field at left.
- XC
- +-+-+-+-+-+-+-+- END OF PART 9 +-+-+-+-+-+-+-+-
- --
- \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
- < Joe Koffley KOFFLEY@NRLVAX.NRL.NAVY.MIL >
- < Naval Research Laboratory KOFFLEY@CCF.NRL.NAVY.MIL >
- < Space Systems Division AT&T : 202-767-0894 >
- \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
-