SUBROUTINE GETDEF ( defuic, lendir, lenprt, prtuic, dirmod, ids ) C+ C SUBROUTINE GETDEF C C Environment: System Utility DEF C Env. Vsn: 01.00 C C Subroutine/Function Description: C C This routine gets the default UIC or directory and the protection C UIC for the local task by calling GETTSK. C C Parameter List: C Name Type I/O Purpose C -------------------------- ------------- ------ ------------------------ C C defuic Character*80 O Default UIC or dir. C lendir Integer*2 O Length of DEFUIC C lenprt Integer*2 O Length of PRTUIC C prtuic Character*80 O Protection UIC C dirmod Logical O Directory mode flag C ids Integer*2 O Error flag C C Data Structures: C COMMON Blocks: NONE C C C Side effects: NONE C C C------------------------------------------------------------------------- C Environmental Requirements C C Re-compile Procedure: See MOVEBLD.CMD C Compile Command: F4P GETDEF=GETDEF/NOTR/RO C Library: MOVE.OLB C Modules called: INSZIP ( MOVE.OLB) C GETTSK ( Executive ) C GETDDS ( Executive ) C C Test Procedures: C Test Data Files: NONE C Test Scripts: NONE C Documents: NONE C C Module Documentation: C Help File: NONE C Document File: C C Required Logicals: NONE C C Required Files: NONE C C C Written By: Robert Hays C KMS Fusion, Inc. C P.O. Box 1567 C Ann Arbor, Mich. 48106 C C Ident: RLH001 C Date: September 29, 1986 C C C Change Log: C Date Initials Ident Description C [dd-mmm-yy] [tbs] [tbs] [tbs......] C---------------------------------------------------------------------------- C- C IDENT /01.00/ C CHARACTER*80 defuic ! OUTPUT - default UIC or ! directory string. CHARACTER*80 prtuic ! OUTPUT - protection UIC. C BYTE mod ! Flag for GETDDS. BYTE defgrp(2), ! Default group and user. + prtgrp(2) ! Protection group and user. C LOGICAL dirmod ! Flag indicating directory ! mode. C INTEGER*2 ids ! Error code and command length. INTEGER*2 lendir, ! Length of default dir. string. + lenprt ! Length of protection UIC. INTEGER*2 idir ! Length of DIR. INTEGER*2 buff(16) ! Buffer for GETTSK values. C EQUIVALENCE ( buff(8), defgrp(1) ) ! This is the easy way to get EQUIVALENCE ( buff(16), prtgrp(1) ) ! the high and low bytes. C DATA idir/80/ ! DIR is 80 characters long. DATA mod/0/ ! Select task default directory. C C Executable begins here. C CALL GETTSK ( buff, ids ) ! Get the task parameters. mod = 0 ! Init GETDDS flag. CALL GETDDS ( mod, defuic, idir, ! Get the default directory + lendir, ids ) ! string. IF ( lendir .LE. 2 ) THEN ! If we only got '[]', then the dirmod = .FALSE. ! user is in SET /NONAMED, or WRITE ( defuic, 10 ) defgrp(2), ! non-directory mode. + defgrp(1) ! DEFGRP is equivalenced to the ! eighth word of BUFF. This is ! the default UIC. 10 FORMAT ( '[',O3,',',O3,']' ) ! CALL INSZIP ( defuic, 2, 8 ) ! Insert zeros for blanks. lendir = 9 ! Always this long in non-dir. ELSE ! In directory, or SET /NAMED dirmod = .TRUE. ! mode. DEFUIC already contains END IF ! the default directory. WRITE ( prtuic, 10 ) prtgrp(2), ! Get the protection UIC for + prtgrp(1) ! potential display. PRTGRP ! is equivalenced to the 16th ! word of BUFF. CALL INSZIP ( prtuic, 2, 8 ) ! Insert zeros for blanks. lenprt = 9 ! Get length of string. ids = 1 ! RETURN ! Return to caller. END