home *** CD-ROM | disk | FTP | other *** search
- Path: wupost!cs.utexas.edu!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 10 of 18
- Message-ID: <1991Sep5.074519.554@nrlvx1.nrl.navy.mil>
- Date: 5 Sep 91 11:45:19 GMT
- Organization: NRL SPACE SYSTEMS DIVISION
- Lines: 435
-
- -+-+-+-+-+-+-+-+ START OF PART 10 -+-+-+-+-+-+-+-+
- 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.11.and.col.eq.50) then
- X line = 3
- X col = 25
- X elseif (line.eq.3.and.col.eq.25) then
- X line = 11
- X col = 50
- X elseif (col.eq.25) then
- X line = line - 1
- X col = 50
- X elseif (col.eq.50) then
- X col = 25
- X endif
- X call smg$set_cursor_abs ( flags_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.and.col.eq.25) then
- X line = 3
- X elseif (line.eq.11.and.col.eq.50) then
- X`09 line = 3
- X`09 else
- X line = line + 1
- X endif
- X call smg$set_cursor_abs ( flags_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.3.and.col.eq.25) then
- X line = 11
- X elseif (line.eq.3.and.col.eq.50) then
- X line = 11
- X else
- X line = line - 1
- X endif
- X call smg$set_cursor_abs ( flags_board, line, col )
- XC
- XC Select or keypad period (.) key - change flag attribute
- 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 ( flags_board, string )
- X call read_flag ( string(1:12) )
- XC
- XC PF2 - go to primary and secondary days screen
- XC
- X elseif (term.eq.smg$k_trm_pf2) then
- X call smg$unpaste_virtual_display ( flags_board,
- X . pasteboard )
- X call show_days ( 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 ( flags_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 ( flags_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
- X
- X call smg$unpaste_virtual_display ( flags_board, pasteboard )
- X
- X end
- X
- XC************************************************************************
- X
- X Subroutine READ_FLAG ( flag )
- XC
- XC The purpose of this subroutine is to read the flag displayed under the
- XC cursor and change it to either true (flag enabled) or false (flag
- XC disabled).
- XC
- X Include 'uaf.cmn'
- X Include '($uaidef)'
- X Integer*4 i, flag_types(18)
- X Character*12 flag_names(18)
- X Character*(*) flag
- X
- X data flag_types
- X . / uai$v_AUDIT, uai$v_RESTRICTED, uai$v_DEFCLI,
- X . uai$v_DISCTLY, uai$v_DISMAIL, uai$v_DISRECONNECT,
- X . uai$v_DISREPORT, uai$v_DISWELCOM, uai$v_GENPWD,
- X . uai$v_LOCKPWD, uai$v_NOMAIL, uai$v_DISACNT,
- X . uai$v_AUTOLOGIN, uai$v_PWD_EXPIRED, uai$v_PWD2_EXPIRED,
- X . uai$v_DISFORCE_PWD_CHANGE, uai$v_CAPTIVE, uai$v_DISIMAGE /
- 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 '/
- XC
- XC Read the string at the cursor and reverse the flag.
- XC
- X do i = 1,18
- X if (flag.eq.flag_names(i)) then
- X if (btest(flags,flag_types(i))) then
- X call lib$bbcci ( flag_types(i), flags )
- X else
- X call lib$bbssi ( flag_types(i), flags )
- X endif
- X endif
- X enddo
- XC
- XC Call subroutine SCAN_FLAG to determine new flag values.
- XC
- X call scan_flag
- X
- X end
- X
- XC************************************************************************
- X
- X Subroutine SCAN_FLAG
- XC
- XC The purpose of this subroutine is to determine which flags are
- XC enabled or disabled and change the video rendition accordingly.
- XC
- X Include 'uaf.cmn'
- X Include '($smgdef)'
- X Include '($uaidef)'
- X Integer*4 line, col, i, j, rend_mask
- X Integer*4 flag_types(18)
- X
- X data flag_types
- X . / uai$v_AUDIT, uai$v_RESTRICTED, uai$v_DEFCLI,
- X . uai$v_DISCTLY, uai$v_DISMAIL, uai$v_DISRECONNECT,
- X . uai$v_DISREPORT, uai$v_DISWELCOM, uai$v_GENPWD,
- X . uai$v_LOCKPWD, uai$v_NOMAIL, uai$v_DISACNT,
- X . uai$v_AUTOLOGIN, uai$v_PWD_EXPIRED, uai$v_PWD2_EXPIRED,
- X . uai$v_DISFORCE_PWD_CHANGE, uai$v_CAPTIVE, uai$v_DISIMAGE /
- X
- X rend_mask = smg$m_bold.or.smg$m_underline
- XC
- XC Find the appropriate flags and highlight the ones held.
- XC
- X line = 3
- X col = 25
- X
- X do j = 1,18,2
- X do i = j,j+1
- X if (btest(flags,flag_types(i))) then
- X call smg$change_rendition ( flags_board,
- X . line, col, 1, 12, rend_mask )
- X else
- X call smg$change_rendition ( flags_board,
- X . line, col, 1, 12, 0 )
- X endif
- X col = col + 25
- X enddo
- X line = line + 1
- X col = 25
- X enddo
- X
- X end
- X
- XC************************************************************************
- X
- X Subroutine SHOW_PRIVS ( owner, tables, defcli, defdev,
- X . defdir, lgicmd )
- XC
- XC The purpose of this subroutine is to find the privileges and paste
- XC them to the screen in order to allow the cursor to move to each
- XC privilege and allow or disallow them as desired.
- XC
- X Include 'uaf.cmn'
- X Include '($smgdef)'
- X Integer*4 line, col
- X Character*25 string
- X Character*(*) owner, tables, defcli, defdev, defdir, lgicmd
- X
- X bogus_key = .true.
- X line = 2
- XC
- XC Paste information to the screen, including all privileges
- XC
- X call smg$begin_pasteboard_update ( pasteboard )
- X call smg$erase_display ( message )
- X call smg$put_chars ( priv_board, ' Privileges: ',
- X . 1, 34 ,, smg$m_bold )
- X call smg$put_chars_wide ( priv_board, ' Default: ',
- X . line+1, 29, smg$m_reverse )
- X
- X line = line + 3
- X col = 5
- XC
- XC Call the subroutine LIST_PRIVS to write the names of the
- XC default privileges to the board.
- XC
- X call list_privs ( line, col )
- X
- X line = line + 2
- X call smg$put_chars_wide ( priv_board, ' Authorized: ',
- X . line, 29, smg$m_reverse )
- X line = line + 2
- X col = 5
- XC
- XC Call the subroutine LIST_PRIVS to write the names of the
- XC authorized privileges to the board.
- XC
- X call list_privs ( line, col )
- XC
- XC Call the subroutine SCAN_PRIVS to determine which privileges
- XC are enabled.
- XC
- X call scan_privs
- XC
- XC Reset the values for line and column.
- XC
- X line = 5
- X col = 5
- XC
- XC Put 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 privilege.
- X . A - All privs N - Normal privs', 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 displays to the screen, end the pasteboard update, and
- XC set the cursor to the first position
- XC
- X call smg$paste_virtual_display ( priv_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 ( priv_board, line, col )
- XC
- XC Read a keystroke and loop until 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.10.and.col.eq.53) then
- X line = 14
- X col = 5
- X elseif (line.eq.19.and.col.eq.53) then
- X line = 5
- X col = 5
- X elseif (col.eq.65) then
- X line = line + 1
- X col = 5
- X else
- X col = col + 12
- X endif
- X call smg$set_cursor_abs ( priv_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.5) then
- X line = 19
- X col = 53
- X elseif (line.eq.14.and.col.eq.5) then
- X line = 10
- X col = 53
- X elseif (col.eq.5) then
- X line = line - 1
- X col = 65
- X else
- X col = col - 12
- X endif
- X call smg$set_cursor_abs ( priv_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.14.and.col.eq.65) then
- X line = 9
- X elseif (line.eq.14) then
- X line = 10
- X elseif (line.eq.5.and.col.eq.65) then
- X line = 18
- X elseif (line.eq.5) then
- X line = 19
- X else
- X line = line - 1
- X endif
- X call smg$set_cursor_abs ( priv_board, line, col )
- XC
- XC Down arrow, or carriage return, or letter 'j' - down to lower 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.10).or.(line.eq.9.and.col.eq.65)) then
- X line = 14
- X elseif ((line.eq.19).or.(line.eq.18.and.col.eq.65)) then
- X line = 5
- X else
- X line = line + 1
- X endif
- X call smg$set_cursor_abs ( priv_board, line, col )
- XC
- XC 'a' key to set all privileges
- XC
- X elseif (term.eq.smg$k_trm_uppercase_a.or.
- X . term.eq.smg$k_trm_lowercase_a) then
- X call all_priv
- XC
- XC 'n' key to set normal privileges
- XC
- X elseif (term.eq.smg$k_trm_uppercase_n.or.
- X . term.eq.smg$k_trm_lowercase_n) then
- X call normal_priv
- XC
- XC Select or keypad period (.) key to toggle privileges
- 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 ( priv_board, string )
- X call read_priv ( string(1:8), line )
- XC
- XC PF1 - go to flags screen
- XC
- X elseif (term.eq.smg$k_trm_pf1) then
- X call smg$unpaste_virtual_display ( priv_board,
- X . pasteboard )
- X call show_flags ( owner, tables, defcli, defdev,
- X . defdir, lgicmd )
- X bogus_key = .false.
- XC
- XC PF2 - go to primary and secondary days screen
- XC
- X elseif (term.eq.smg$k_trm_pf2) then
- X call smg$unpaste_virtual_display ( priv_board,
- X . pasteboard )
- X call show_days ( 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 ( priv_board,
- X . pasteboard )
- X call show_access ( 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 ( priv_board, pasteboard )
- X
- X end
- X
- XC***************************************************************************
- V****
- X
- X Subroutine SCAN_PRIVS
- XC
- XC The purpose of this subroutine is to determine which privileges
- XC are enabled and set the video rendition accordingly.
- XC
- X Include 'uaf.cmn'
- X Include '($smgdef)'
- X Include '($prvdef)'
- X Integer*4 i, j, line, col, rend_mask
- X Integer*4 privs(35)
- X
- X data privs
- X . /prv$v_CMKRNL, prv$v_CMEXEC, prv$v_SYSNAM,
- X . prv$v_GRPNAM, prv$v_ALLSPOOL, prv$v_DETACH, prv$v_DIAGNOSE,
- X . prv$v_LOG_IO, prv$v_GROUP, prv$v_PRMCEB, prv$v_PSWAPM,
- +-+-+-+-+-+-+-+- END OF PART 10 +-+-+-+-+-+-+-+-
- --
- \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
- < Joe Koffley KOFFLEY@NRLVAX.NRL.NAVY.MIL >
- < Naval Research Laboratory KOFFLEY@CCF.NRL.NAVY.MIL >
- < Space Systems Division AT&T : 202-767-0894 >
- \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
-