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 7 of 18
- Message-ID: <1991Sep5.074402.551@nrlvx1.nrl.navy.mil>
- Date: 5 Sep 91 11:44:02 GMT
- Organization: NRL SPACE SYSTEMS DIVISION
- Lines: 415
-
- -+-+-+-+-+-+-+-+ START OF PART 7 -+-+-+-+-+-+-+-+
- X call str$upcase ( dummy_string, dummy_string )
- X call reconvert_time ( dummy_string, 'exprdate' )
- X if (success) then ! date was translated correctly
- X exprdate = dummy_string
- X else ! date was not translated correctly
- X call board ( owner, tables, defcli, defdev,
- X . defdir, lgicmd )
- X call smg$repaint_line ( pasteboard, cur_row )
- X call smg$set_cursor_abs ( main, cur_row, cur_column )
- X go to 10
- X endif
- X endif
- XC
- XC String at 11-13 is PWD_LENGTH
- XC
- X if (cur_row.eq.11.and.cur_column.eq.13) then
- X call ots$cvt_ti_l ( dummy_string(1:dummy_string_length),
- X . pwd_length )
- X call ots$cvt_l_ti ( pwd_length, pwd_length_string )
- X endif
- XC
- XC String at 11-48 is PWD_LIFETIME
- XC
- X if (cur_row.eq.11.and.cur_column.eq.48) then
- X call reconvert_time ( dummy_string, 'pwdlife' )
- X if (success) then ! date was translated correctly
- X pwd_lifetime = dummy_string
- X else ! date was not translated
- X call board ( owner, tables, defcli, defdev,
- X . defdir, lgicmd )
- X call smg$repaint_line ( pasteboard, cur_row )
- X call smg$set_cursor_abs ( main, cur_row, cur_column )
- X go to 10
- X endif
- X endif
- XC
- XC String at 13-16 is MAXJOBS
- XC
- X if (cur_row.eq.13.and.cur_column.eq.16) then
- X call ots$cvt_ti_l ( dummy_string(1:dummy_string_length),
- X . maxjobs )
- X call ots$cvt_l_ti ( maxjobs, maxjobs_string )
- X endif
- XC
- XC String at 13-35 is FILLM
- XC
- X if (cur_row.eq.13.and.cur_column.eq.35) then
- X call ots$cvt_ti_l ( dummy_string(1:dummy_string_length),
- X . fillm )
- X call ots$cvt_l_ti ( fillm, fillm_string )
- X endif
- XC
- XC String at 13-56 is BYTLM
- XC
- X if (cur_row.eq.13.and.cur_column.eq.56) then
- X call ots$cvt_ti_l ( dummy_string(1:dummy_string_length),
- X . bytlm )
- X call ots$cvt_l_ti ( bytlm, bytlm_string )
- X endif
- XC
- XC String at 14-16 is MAXACCTJOBS
- XC
- X if (cur_row.eq.14.and.cur_column.eq.16) then
- X call ots$cvt_ti_l ( dummy_string(1:dummy_string_length),
- X . maxacctjobs )
- X call ots$cvt_l_ti ( maxacctjobs, maxacctjobs_string )
- X endif
- XC
- XC String at 14-35 is SHRFILLM
- XC
- X if (cur_row.eq.14.and.cur_column.eq.35) then
- X call ots$cvt_ti_l ( dummy_string(1:dummy_string_length),
- X . shrfillm )
- X call ots$cvt_l_ti ( shrfillm, shrfillm_string )
- X endif
- XC
- XC String at 14-56 is PBYTLM
- XC
- X if (cur_row.eq.14.and.cur_column.eq.56) then
- X call ots$cvt_ti_l ( dummy_string(1:dummy_string_length),
- X . pbytlm )
- X call ots$cvt_l_ti ( pbytlm, pbytlm_string )
- X endif
- XC
- XC String at 15-16 is MAXDETACH
- XC
- X if (cur_row.eq.15.and.cur_column.eq.16) then
- X call ots$cvt_ti_l ( dummy_string(1:dummy_string_length),
- X . maxdetach )
- X call ots$cvt_l_ti ( maxdetach, maxdetach_string )
- X endif
- XC
- XC String at 15-35 is BIOLM
- XC
- X if (cur_row.eq.15.and.cur_column.eq.35) then
- X call ots$cvt_ti_l ( dummy_string(1:dummy_string_length),
- X . biolm )
- X call ots$cvt_l_ti ( biolm, biolm_string )
- X endif
- XC
- XC String at 15-56 is JTQUOTA
- XC
- X if (cur_row.eq.15.and.cur_column.eq.56) then
- X call ots$cvt_ti_l ( dummy_string(1:dummy_string_length),
- X . jtquota )
- X call ots$cvt_l_ti ( jtquota, jtquota_string )
- X endif
- XC
- XC String at 16-16 is PRCLM
- XC
- X if (cur_row.eq.16.and.cur_column.eq.16) then
- X call ots$cvt_ti_l ( dummy_string(1:dummy_string_length),
- X . prclm )
- X call ots$cvt_l_ti ( prclm, prclm_string )
- X endif
- XC
- XC String at 16-35 is DIOLM
- XC
- X if (cur_row.eq.16.and.cur_column.eq.35) then
- X call ots$cvt_ti_l ( dummy_string(1:dummy_string_length),
- X . diolm )
- X call ots$cvt_l_ti ( diolm, diolm_string )
- X endif
- XC
- XC String at 16-56 is WSDEF
- XC
- X if (cur_row.eq.16.and.cur_column.eq.56) then
- X call ots$cvt_ti_l ( dummy_string(1:dummy_string_length),
- X . wsdef )
- X call ots$cvt_l_ti ( wsdef, wsdef_string )
- X endif
- XC
- XC String at 17-16 is PRIO
- XC
- X if (cur_row.eq.17.and.cur_column.eq.16) then
- X call ots$cvt_ti_l ( dummy_string(1:dummy_string_length),
- X . prio )
- X call ots$cvt_l_ti ( prio, prio_string )
- X endif
- XC
- XC String at 17-35 is ASTLM
- XC
- X if (cur_row.eq.17.and.cur_column.eq.35) then
- X call ots$cvt_ti_l ( dummy_string(1:dummy_string_length),
- X . astlm )
- X call ots$cvt_l_ti ( astlm, astlm_string )
- X endif
- XC
- XC String at 17-56 is WSQUO
- XC
- X if (cur_row.eq.17.and.cur_column.eq.56) then
- X call ots$cvt_ti_l ( dummy_string(1:dummy_string_length),
- X . wsquo )
- X call ots$cvt_l_ti ( wsquo, wsquo_string )
- X endif
- XC
- XC String at 18-16 is QUEPRIO
- XC
- X if (cur_row.eq.18.and.cur_column.eq.16) then
- X call ots$cvt_ti_l ( dummy_string(1:dummy_string_length),
- X . queprio )
- X call ots$cvt_l_ti ( queprio, queprio_string )
- X endif
- XC
- XC String at 18-35 is TQELM
- XC
- X if (cur_row.eq.18.and.cur_column.eq.35) then
- X call ots$cvt_ti_l ( dummy_string(1:dummy_string_length),
- X . tqelm )
- X call ots$cvt_l_ti ( tqelm, tqelm_string )
- X endif
- XC
- XC String at 18-56 is WSEXTENT
- XC
- X if (cur_row.eq.18.and.cur_column.eq.56) then
- X call ots$cvt_ti_l ( dummy_string(1:dummy_string_length),
- X . wsextent )
- X call ots$cvt_l_ti ( wsextent, wsextent_string )
- X endif
- XC
- XC String at 19-12 is CPU
- XC
- X if (cur_row.eq.19.and.cur_column.eq.12) then
- X call reconvert_time ( dummy_string, 'cputime' )
- X if (success) then
- X cpu_string = dummy_string
- X else
- X call board ( owner, tables, defcli, defdev,
- X . defdir, lgicmd )
- X call smg$repaint_line ( pasteboard, cur_row )
- X call smg$set_cursor_abs ( main, cur_row, cur_column )
- X go to 10
- X endif
- X endif
- XC
- XC String at 19-35 is ENQLM
- XC
- X if (cur_row.eq.19.and.cur_column.eq.35) then
- X call ots$cvt_ti_l ( dummy_string(1:dummy_string_length),
- X . enqlm )
- X call ots$cvt_l_ti ( enqlm, enqlm_string )
- X endif
- XC
- XC String at 19-56 is PGFLQUO
- XC
- X if (cur_row.eq.19.and.cur_column.eq.56) then
- X call ots$cvt_ti_l ( dummy_string(1:dummy_string_length),
- X . pgflquo )
- X call ots$cvt_l_ti ( pgflquo, pgflquo_string )
- X endif
- XC
- XC Call the main board again
- XC
- X call board ( owner, tables, defcli, defdev,
- X . defdir, lgicmd )
- X call smg$repaint_line ( pasteboard, cur_row )
- X call smg$set_cursor_abs ( main, cur_row, cur_column )
- X endif
- X
- X go to 10
- X
- X end
- X
- XC************************************************************************
- X
- X Subroutine RECONVERT_TIME ( asctime, string )
- XC
- XC The purpose of this subroutine is to convert the time string
- XC to binary time and back to ascii time so that the display will
- XC be correct. Another purpose of this subroutine is to create
- XC values to be set by $SETUAI when changes are to be saved.
- XC
- X Include '($ssdef)'
- X Include 'uaf.cmn'
- X Include '($smgdef)'
- X Integer*4 istat
- X Integer*2 bintim(4)
- X Character*2 dummy
- X Character*(*) asctime, string
- XC
- XC Make the call to SYS$BINTIM to translate the ascii time.
- XC
- X if (string(1:4).eq.'expr') then
- X`09 if (index(asctime,'NONE') .ne. 0) then
- X`09 call repeat (asctime, ' ')
- X`09 asctime = '0 00:00:00'
- X`09 endif
- X
- X istat = sys$bintim ( asctime, expir )
- X
- X elseif (string(1:4).eq.'pwdl') then
- X
- X`09 if (index(asctime,'NONE') .ne. 0) then
- X`09 call repeat (asctime, ' ')
- X`09 asctime = '0 00:00:00'
- X`09 endif
- X
- X istat = sys$bintim ( asctime, pwd_life )
- X
- X elseif (string(1:3).eq.'cpu') then
- X`09 if (index(asctime,'NONE') .ne. 0) then
- X`09 call repeat (asctime, ' ')
- X`09 asctime = '0 00:00:00'
- X`09 endif
- X istat = sys$bintim ( asctime, bintim )
- X
- X else
- X istat = sys$bintim ( asctime, bintim )
- X endif
- XC
- XC If in incorrect value is entered, display the error message and
- XC return to the calling program
- XC
- X if (istat.gt.1) then
- X call smg$flush_buffer ( pasteboard )
- X call smg$erase_display ( error_message,,,,)
- X if (string(1:4).eq.'expr') then
- X call smg$put_chars ( error_message,
- X . 'Invalid time: use format DD-MMM-YYYY or NONE ', 1, 2 )
- X else
- X call smg$put_chars ( error_message,
- X . 'Invalid time: use format 0 00:00:00.00 or NONE', 1, 2 )
- X endif
- X call smg$erase_chars ( error_message,49,2,2)
- X call smg$put_chars ( error_message,
- X . ' (hit any key to continue) ', 2, 2 )
- X call smg$paste_virtual_display ( error_message,
- X . pasteboard, 10, 20 )
- X call smg$read_keystroke ( keyboard, term )
- X call smg$unpaste_virtual_display ( error_message,
- X . pasteboard )
- X success = .false.
- X return
- X endif
- XC
- XC If the correct value was entered, translate to ascii time using
- XC SYS$ASCTIM.
- XC
- X if (string(1:4).eq.'expr') then
- X call sys$asctim ( , asctime, expir, 0 )
- X elseif (string(1:4).eq.'pwdl') then
- X call sys$asctim ( , asctime, pwd_life, 0 )
- X else
- X call sys$asctim ( , asctime, bintim, 0 )
- X endif
- X if (asctime(1:6).eq.'17-NOV') asctime = ' (none)'
- X success = .true.
- XC
- XC If the time converted was cputime, set the new value for cputime
- XC to be used by $SETUAI
- XC
- X if (string(1:3).eq.'cpu') then
- X if (asctime.ne.' (none)') then
- X dummy = asctime(3:4)
- X call ots$cvt_ti_l ( dummy, days )
- X dummy = asctime(6:7)
- X call ots$cvt_ti_l ( dummy, hours )
- X dummy = asctime(9:10)
- X call ots$cvt_ti_l ( dummy, minutes )
- X dummy = asctime(12:13)
- X call ots$cvt_ti_l ( dummy, seconds )
- X cpu = (days*360000) *24
- X cpu = cpu + (hours*360000)
- X cpu = cpu + (minutes*6000)
- X cpu = cpu + (seconds*100)
- X endif
- X endif
- X
- X end
- X
- XC************************************************************************
- X
- X Subroutine SHOW_ACCESS ( owner, tables, defcli, defdev,
- X . defdir, lgicmd )
- XC
- XC The purpose of this subroutine is to display the hourly access times
- XC for the user. The select key, or keypad period (.) key, toggles edit
- XC mode. The PF keys select an alternate screen. The arrow keys move the
- XC cursor through the various fields. The return key moves the cursor in
- XC a downward direction. The plus (+) key, or Insert Here key, allows
- XC complete access to a login type. A minus (-) key, or Remove key,
- XC removes access to the field. CtrlW repaints the screen. CtrlZ exits
- XC to the main screen.
- XC
- X Include 'uaf.cmn'
- X Include '($smgdef)'
- X Integer*4 line, col
- X Character*80 access_descr1, access_descr2
- X Character*10 access_flag
- X Character*(*) owner, tables, defcli, defdev, defdir, lgicmd
- X
- X bogus_key = .true.
- X line = 3
- X access_descr1 =
- X .'Primary 000000000011111111112222
- X . Secondary 000000000011111111112222'
- X access_descr2 =
- X .'Day Hours 012345678901234567890123
- X . Day Hours 012345678901234567890123'
- XC
- XC Put the descriptive strings to the display
- XC
- X call smg$begin_pasteboard_update ( pasteboard )
- X call smg$erase_display ( message )
- X call smg$put_chars ( access_board, ' Access Restrictions: ',
- X . 1, 29 ,, smg$m_bold )
- X
- X call smg$put_chars ( access_board, access_descr1, line, 1 )
- X call smg$put_chars ( access_board, access_descr2, line+1, 1 )
- X
- X call smg$put_chars ( access_board, '(#) = access is allowed
- X . (-) = access is not allowed', 13, 1 )
- X
- X line = 5
- XC
- XC Find out access times (using the subroutine FIND_ACCESS) and put them
- XC to the display
- XC
- X access_flag = 'Network:'
- X call find_access ( access_flag, line, network_p, network_s )
- X line = line + 1
- X access_flag = 'Batch:'
- X call find_access ( access_flag, line, batch_p, batch_s )
- X line = line + 1
- X access_flag = 'Local:'
- X call find_access ( access_flag, line, local_p, local_s )
- X line = line + 1
- X access_flag = 'Dialup:'
- X call find_access ( access_flag, line, dialup_p, dialup_s )
- X line = line + 1
- X access_flag = 'Remote:'
- X call find_access ( access_flag, line, remote_p, remote_s )
- XC
- XC Reset the values for line and column.
- XC
- X line = 5
- X col = 11
- XC
- XC Paste the finished display to the board
- XC
- X call smg$put_chars ( message,
- X . 'Use arrow keys to move to desired field and position.', 1, 2 )
- X call smg$put_chars ( message,
- X . 'Hit SELECT or PERIOD to enter change mode.', 2, 2 )
- X call smg$put_chars ( message,
- X . '(+) to allow all access, (-) to disallow all access.',
- X . 3, 2 )
- +-+-+-+-+-+-+-+- END OF PART 7 +-+-+-+-+-+-+-+-
- --
- \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
- < Joe Koffley KOFFLEY@NRLVAX.NRL.NAVY.MIL >
- < Naval Research Laboratory KOFFLEY@CCF.NRL.NAVY.MIL >
- < Space Systems Division AT&T : 202-767-0894 >
- \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
-