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 5 of 18
- Message-ID: <1991Sep5.074307.549@nrlvx1.nrl.navy.mil>
- Date: 5 Sep 91 11:43:07 GMT
- Organization: NRL SPACE SYSTEMS DIVISION
- Lines: 368
-
- -+-+-+-+-+-+-+-+ START OF PART 5 -+-+-+-+-+-+-+-+
- X call str$upcase ( confirm, confirm )
- X if (confirm(1:1).eq.'N') go to 20
- X endif
- XC
- XC If the account is to be added, or the password is to be changed on
- XC an already existing account, or the account is be renamed:
- XC call SPAWN_DCL.
- XC
- X if (.not.user_exists.or.rename.or.pwd_change) then
- X call spawn_dcl ( owner, tables,
- X . defcli, defdev, defdir, lgicmd )
- X endif
- XC
- XC Make the call to $SETUAI to set all items (including those items
- XC not changed.
- XC
- X sts = sys$setuai ( ,, username, itemlist ,,, )
- X if (.not.sts) call lib$signal ( %val(sts) )
- XC
- XC If you do not want to send a mail message to the new user, remove
- XC the following line.
- XC
- X if (.not. user_exists) call sendmail
- X
- X if (user_exists) then
- X call smg$put_chars ( main,
- X . 'Account has been modified', 21, 1 )
- X endif
- X
- X call smg$repaint_line ( pasteboard, 22 )
- X
- X change = .false.
- XC
- XC Ask for another user profile
- XC
- X20 call smg$set_cursor_abs ( main, 22, 1 )
- X call smg$erase_line ( main, 22, 80 )
- X call smg$read_string ( keyboard, u,
- X . 'PROFILE> ', 20 ,,,, length )
- X if (length.eq.0) call AST
- X call str$upcase ( u, u )
- X u_len = length
- X call smg$delete_pasteboard ( pasteboard )
- X go to 10
- X
- X end
- X
- XC***************************************************************************
- V****
- X
- X Integer Function CONVERT ( int, string )
- XC
- XC The purpose of this function is to convert the integer to an ascii
- XC string in order for SMG to use it.
- XC
- X Character*(*) string
- X Integer*4 ots$cvt_l_ti
- X Integer*4 int, sts
- X
- X sts = ots$cvt_l_ti ( int, string )
- X if (.not.sts) call lib$signal ( %val(sts) )
- X
- X end
- X
- XC************************************************************************
- X
- X Subroutine STRING_LENGTHS ( owner, tables, defcli, defdev,
- X . defdir, lgicmd )
- XC
- XC The purpose of this subroutine is to gather the string lengths
- XC and pass them to the calling program.
- XC
- X Include 'uaf.cmn'
- X Character*(*) owner, tables, defcli, defdev, defdir, lgicmd
- XC
- XC Some definitions. The _len definitions locate the end of the string.
- XC
- X uic_len = index(uic,' ')-1
- X if (uic_len.eq.-1) uic_len = 15
- X owner_len = index(owner,' ')-1
- X if (owner_len.eq.-1) owner_len = 32
- X username_len = index(username,' ')-1
- X if (username_len.eq.-1) username_len = 12
- X account_len = index(account,' ')-1
- X if (account_len.eq.-1) account_len = 8
- X defdev_len = index(defdev,':')-1
- X if (defdev_len.eq.-1) defdev_len = 32
- X defdir_len = index(defdir,' ')-1
- X if (defdir_len.eq.-1) defdir_len = 64
- X lgicmd_len = index(lgicmd,' ')-1
- X if (lgicmd_len.eq.-1) lgicmd_len = 32
- X defcli_len = index(defcli,' ')-1
- X if (defcli_len.eq.-1) defcli_len = 32
- X tables_len = index(tables,' ')-1
- X if (tables_len.eq.-1) tables_len = 32
- X password_len = index(password,' ')-1
- X if (password_len.eq.-1) password_len = 12
- X pwd_life_len = index(pwd_lifetime,')')
- X if (pwd_life_len.eq.0.or.pwd_life_len.eq.-1)
- X . pwd_life_len = 10
- X expir_len = index(exprdate,')')
- X if (expir_len.eq.0.or.expir_len.eq.-1) expir_len = 23
- X
- X end
- X
- XC************************************************************************
- X
- X Subroutine BOARD ( owner, tables, defcli, defdev,
- X . defdir, lgicmd )
- XC
- XC The purpose of this subroutine is to paste all of the information from
- XC the $GETUAI call to the main board and call the selection process.
- XC
- X Include 'uaf.cmn'
- X Include '($smgdef)'
- X Character*(*) owner, tables, defcli, defdev, defdir, lgicmd
- XC
- XC Subroutine STRING_LENGTHS gets the actual length of the strings.
- XC
- X call string_lengths ( owner, tables, defcli, defdev,
- X . defdir, lgicmd )
- XC
- XC Create the actual displays.
- XC
- XC The main board:
- XC
- X call smg$begin_pasteboard_update ( pasteboard )
- X call smg$put_chars ( main, ' USER PROFILE ', 1, 33 ,,
- X . smg$m_reverse )
- X call smg$put_chars ( main, 'Username: ', 3, 2 )
- X call smg$put_chars ( main, username(1:username_len), 3, 13 ,,
- X . smg$m_underline )
- X call smg$put_chars ( main, 'Owner: ', 3, 37 )
- X call smg$put_chars ( main, owner(1:owner_len), 3, 48 ,,
- X . smg$m_underline )
- X call smg$put_chars ( main, 'Account: ', 4, 2 )
- X call smg$put_chars ( main, account(1:account_len),
- X . 4, 13 ,, smg$m_underline )
- X call smg$put_chars ( main, 'UIC: ', 4, 37 )
- X call smg$put_chars ( main, uic(1:uic_len), 4, 48 ,,
- X . smg$m_underline )
- X call smg$put_chars ( main, 'CLI: ', 5, 2 )
- X call smg$put_chars ( main, defcli(1:defcli_len),
- X . 5, 13 ,, smg$m_underline )
- X call smg$put_chars ( main, 'Tables: ', 5, 37 )
- X call smg$put_chars ( main, tables(1:tables_len),
- X . 5, 48 ,, smg$m_underline )
- X call smg$put_chars ( main, 'Device: ', 6, 2 )
- X call smg$put_chars ( main, defdev(1:defdev_len),
- X . 6, 13 ,, smg$m_underline )
- X call smg$put_chars ( main, 'Directory: ', 6, 37 )
- X call smg$put_chars ( main, defdir(1:defdir_len),
- X . 6, 48 ,, smg$m_underline )
- X call smg$put_chars ( main, 'LGICMD: ', 7, 2 )
- X call smg$put_chars ( main, lgicmd(1:lgicmd_len),
- X . 7, 13 ,, smg$m_underline )
- X call smg$put_chars ( main, 'Password: ', 7, 37 )
- X call smg$put_chars ( main, password(1:password_len),
- X . 7, 48 ,, smg$m_underline )
- X call smg$put_chars ( main, 'Rights Held: ', 8, 2 )
- X call smg$put_chars ( main, '<F17>', 8, 15 ,, smg$m_bold )
- X call smg$put_chars ( main, 'Pre-expired: ', 8, 37 )
- X if (index(password_change_date,'0 00:00:00.00') .ne. 0) then
- X call smg$put_chars ( main, 'YES',
- X`091 8, 50 ,, smg$m_underline .or. smg$m_bold )
- Xd`09 write (66,*) 'password pre-expired'
- X`09else
- X call smg$put_chars ( main, password_change_date(1:),
- X`091 8, 50 ,, smg$m_underline )
- Xd`09 write (66,*) 'last pword change: ',password_change_date
- X`09endif
- X call smg$put_chars ( main, 'Login Flags: ', 9, 2 )
- X call smg$put_chars ( main, '<PF1>', 9, 15 ,, smg$m_bold )
- X call smg$put_chars ( main, 'Primary and Secondary days: ',
- X . 9, 37 )
- X call smg$put_chars ( main, '<PF2>', 9, 65 ,, smg$m_bold )
- X call smg$put_chars ( main, 'Access restrictions: ', 10, 2 )
- X call smg$put_chars ( main, '<PF3>', 10, 23 ,, smg$m_bold )
- X call smg$put_chars ( main, 'Expiration: ', 10, 37 )
- X call smg$put_chars ( main, exprdate(1:expir_len),
- X . 10, 48 ,, smg$m_underline )
- X call smg$put_chars ( main, 'Pwdminimum: ', 11, 2 )
- X call smg$put_chars ( main, pwd_length_string, 11, 13 ,,
- X . smg$m_underline )
- X call smg$put_chars ( main, 'Pwlifetime: ', 11, 37 )
- X call smg$put_chars ( main, pwd_lifetime(1:pwd_life_len),
- X . 11, 48 ,, smg$m_underline )
- X call smg$put_chars ( main, 'Maxjobs: ', 13, 2 )
- X call smg$put_chars ( main, maxjobs_string, 13, 16 ,,
- X . smg$m_underline )
- X call smg$put_chars ( main, 'Fillm: ', 13, 24 )
- X call smg$put_chars ( main, fillm_string, 13, 35 ,,
- X . smg$m_underline )
- X call smg$put_chars ( main, 'Bytlm: ', 13, 43 )
- X call smg$put_chars ( main, bytlm_string, 13, 56 ,,
- X . smg$m_underline )
- X call smg$put_chars ( main, 'Maxacctjobs: ', 14, 2 )
- X call smg$put_chars ( main, maxacctjobs_string,
- X . 14, 16 ,, smg$m_underline )
- X call smg$put_chars ( main, 'Shrfillm: ', 14, 24 )
- X call smg$put_chars ( main, shrfillm_string, 14, 35 ,,
- X . smg$m_underline )
- X call smg$put_chars ( main, 'Pbytlm: ', 14, 43 )
- X call smg$put_chars ( main, pbytlm_string, 14, 56 ,,
- X . smg$m_underline )
- X call smg$put_chars ( main, 'Maxdetach: ', 15, 2 )
- X call smg$put_chars ( main, maxdetach_string, 15, 16 ,,
- X . smg$m_underline )
- X call smg$put_chars ( main, 'BIOlm: ', 15, 24 )
- X call smg$put_chars ( main, biolm_string, 15, 35 ,,
- X . smg$m_underline )
- X call smg$put_chars ( main, 'JTquota ', 15, 43 )
- X call smg$put_chars ( main, jtquota_string, 15, 56 ,,
- X . smg$m_underline )
- X call smg$put_chars ( main, 'Prclm: ', 16, 2 )
- X call smg$put_chars ( main, prclm_string, 16, 16 ,,
- X . smg$m_underline )
- X call smg$put_chars ( main, 'DIOlm: ', 16, 24 )
- X call smg$put_chars ( main, diolm_string, 16, 35 ,,
- X . smg$m_underline )
- X call smg$put_chars ( main, 'WSdef: ', 16, 43 )
- X call smg$put_chars ( main, wsdef_string, 16, 56 ,,
- X . smg$m_underline )
- X call smg$put_chars ( main, 'Prio: ', 17, 2 )
- X call smg$put_chars ( main, prio_string, 17, 16 ,,
- X . smg$m_underline )
- X call smg$put_chars ( main, 'ASTlm: ', 17, 24 )
- X call smg$put_chars ( main, astlm_string, 17, 35 ,,
- X . smg$m_underline )
- X call smg$put_chars ( main, 'WSquo: ', 17, 43 )
- X call smg$put_chars ( main, wsquo_string, 17, 56 ,,
- X . smg$m_underline )
- X call smg$put_chars ( main, 'Queprio: ', 18, 2 )
- X call smg$put_chars ( main, queprio_string, 18, 16 ,,
- X . smg$m_underline )
- X call smg$put_chars ( main, 'TQElm: ', 18, 24 )
- X call smg$put_chars ( main, tqelm_string, 18, 35 ,,
- X . smg$m_underline )
- X call smg$put_chars ( main, 'WSextent: ', 18, 43 )
- X call smg$put_chars ( main, wsextent_string, 18, 56 ,,
- X . smg$m_underline )
- X call smg$put_chars ( main, 'CPU: ', 19, 2 )
- X call smg$put_chars ( main, cpu_string, 19, 12 ,,
- X . smg$m_underline )
- X call smg$put_chars ( main, 'Enqlm: ', 19, 24 )
- X call smg$put_chars ( main, enqlm_string, 19, 35 ,,
- X . smg$m_underline )
- X call smg$put_chars ( main, 'Pgflquo: ', 19, 43 )
- X call smg$put_chars ( main, pgflquo_string, 19, 56 ,,
- X . smg$m_underline )
- X call smg$put_chars ( main,
- X . 'Authorized and Default privileges: ', 20, 2 )
- X call smg$put_chars ( main, '<PF4>', 20, 37 ,, smg$m_bold )
- X call smg$put_chars ( main, 'Last Logins: ', 21, 2 )
- X call smg$put_chars ( main, '<F18>', 21, 15 ,, smg$m_bold )
- XC
- XC The message (or help) board:
- 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 . 'To enter text: hit INSERT HERE, ENTER, or I followed by text.
- X . ', 2, 2 )
- X call smg$put_chars ( message,
- X . 'PF keys: go to another screen. ControlZ: exit program and
- X . save changes.', 3, 2 )
- XC
- XC Paste the main and message boards to the screen.
- XC
- X call smg$paste_virtual_display ( main, pasteboard, 1, 1 )
- X call smg$paste_virtual_display ( message, pasteboard, 22, 1 )
- X call smg$end_pasteboard_update ( pasteboard )
- X
- X end
- X
- XC************************************************************************
- X
- X Subroutine SELECT ( owner, tables, defcli, defdev,
- X . defdir, lgicmd )
- XC
- XC The purpose of this subroutine is to read a keystroke and perform the
- XC function dictated by that keystroke. The arrow keys move the cursor
- XC through the various fields. The return key moves the cursor in a
- XC downward motion. The PF keys change the display to an alternate screen.
- XC The 'Insert Here' key, or the keypad 'Enter' key, places the screen in
- XC edit mode for entering data (terminated by the return key, or any of the
- XC arrow keys). CtrlZ exits the program. CtrlW repaints the screen. The
- XC Unix 'hjkl' scheme is also implemented for those accustomed to
- XC the ease of using those keys for cursor movement.
- XC
- X Include 'uaf.cmn'
- X Include '($smgdef)'
- X Include '($trmdef)'
- X Integer*4 cur_row, cur_column, string_len, term_addr
- X Integer*4 dummy_string_length, modifiers, num_str_len
- X Character*30 string, dummy_string
- X Character*6 num_str
- X Character*(*) owner, tables, defcli, defdev, defdir, lgicmd
- XC
- XC Set up a structure for the string terminator mask. This is done
- XC so that hitting an up_arrow, down_arrow, right_arrow, left_arrow,
- XC or carriage return will cause the string read to terminate.
- XC
- X Structure /Trm/
- X Union
- X Map
- X Integer*2 blank
- X Integer*2 size
- X Integer*4 addr
- X End map
- X End union
- X End structure
- X
- X Record /Trm/ Term_set(1)
- X
- X Term_set(1).blank = 0
- X Term_set(1).size = 32
- X Term_set(1).addr = %loc(term_addr)
- XC
- XC This is the mask for the string terminator
- XC
- X term_addr = smg$k_trm_up.or.smg$k_trm_down.or.
- X . smg$k_trm_right.or.smg$k_trm_left.or.smg$k_trm_cr.or.
- X . smg$k_trm_ctrlm
- XC
- XC This is the mask for the terminator modifiers
- XC
- X modifiers = trm$m_tm_norecall.or.trm$m_tm_noedit
- XC
- XC Declare the current row and column.
- XC
- X cur_row = 3
- X cur_column = 13
- XC
- XC Set the cursor to the current row and column.
- XC
- X call smg$set_cursor_abs ( main, cur_row, cur_column )
- XC
- XC Read a keystroke and make a decision based on which key is hit.
- XC
- X10 call smg$read_keystroke ( keyboard, term )
- XC
- XC PF1 - subroutine SHOW_FLAGS
- XC
- X if (term.eq.smg$k_trm_pf1) then
- X call smg$unpaste_virtual_display ( main, pasteboard )
- X call show_flags ( owner, tables, defcli, defdev,
- X . defdir, lgicmd )
- X call board ( owner, tables, defcli, defdev,
- X . defdir, lgicmd )
- X call smg$set_cursor_abs ( main, cur_row, cur_column )
- XC
- XC PF2 - subroutine SHOW_DAYS
- XC
- X elseif (term.eq.smg$k_trm_pf2) then
- X call smg$unpaste_virtual_display ( main, pasteboard )
- X call show_days ( owner, tables, defcli, defdev,
- X . defdir, lgicmd )
- X call board ( owner, tables, defcli, defdev,
- X . defdir, lgicmd )
- +-+-+-+-+-+-+-+- END OF PART 5 +-+-+-+-+-+-+-+-
- --
- \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
- < Joe Koffley KOFFLEY@NRLVAX.NRL.NAVY.MIL >
- < Naval Research Laboratory KOFFLEY@CCF.NRL.NAVY.MIL >
- < Space Systems Division AT&T : 202-767-0894 >
- \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
-