Trailing-Edge
-
PDP-10 Archives
-
AP-4172F-BM
-
3a-sources/dluser.mac
There are 29 other files named dluser.mac in the archive. Click here to see a list.
;<3-UTILITIES>DLUSER.MAC.10, 8-Nov-77 10:46:57, EDIT BY KIRSCHEN
;MORE COPYRIGHT UPDATING...
;<3-UTILITIES>DLUSER.MAC.9, 26-Oct-77 11:00:42, EDIT BY KIRSCHEN
;<3-UTILITIES>DLUSER.MAC.8, 29-Sep-77 21:00:37, EDIT BY OSMAN
;FIX LAST EDIT (,, => +)
;<3-UTILITIES>DLUSER.MAC.7, 29-Sep-77 20:53:18, EDIT BY OSMAN
;DON'T DO RLJFN THAT WIPES OUT OTHER PROCESS'S JFN'S. INSTEAD, DO CLZFF
;<3-UTILITIES>DLUSER.MAC.6, 1-Aug-77 15:47:36, Edit by MACK
;TCO 1822 - DUMP/LOAD DEFAULT DIRECTORY ACCOUNTS
;<3-UTILITIES>DLUSER.MAC.5, 21-Jul-77 16:41:26, EDIT BY HURLEY
;<3-UTILITIES>DLUSER.MAC.4, 19-Jul-77 18:38:23, EDIT BY HURLEY
;MAKE DLUSER NOT CHANGE THE PARAMETERS OF AN EXISTING DIR ON A LOAD
;<3-UTILITIES>DLUSER.MAC.3, 5-Jul-77 16:07:34, EDIT BY HURLEY
;<3-UTILITIES>DLUSER.MAC.2, 5-Jul-77 16:00:27, EDIT BY HURLEY
;ADDED SUPPORT FOR .CDLEN IN GTDIR
;<3-UTILITIES>DLUSER.MAC.1, 22-Jun-77 16:32:20, EDIT BY HALL
;TCO 1814 - CHANGED DMPUSR TO USE RCDIR FOR STEPPING THROUGH DIRECTORIES
;CHANGED DUMPING AND LOADING TO UNDERSTAND EXTENDED BLOCKS FOR GTDIR
; AND CRDIR
;<2-UTILITIES>DLUSER.MAC.12, 20-Jan-77 14:15:41, EDIT BY HURLEY
;FIX ERROR MESSAGE FORMAT
;<2-UTILITIES>DLUSER.MAC.11, 27-Dec-76 17:05:29, EDIT BY HURLEY
;<2-UTILITIES>DLUSER.MAC.10, 7-Dec-76 13:06:46, Edit by HESS
;CHECK PROCESS CAPABILITIES BEFORE STARTING
;<2-UTILITIES>DLUSER.MAC.9, 9-Sep-76 17:09:59, Edit by HESS
;ADD ^A FEATURE TO DLUSER
;<2-UTILITIES>DLUSER.MAC.8, 2-Sep-76 13:22:37, Edit by HESS
;TCO 1507 - SUPPORT STRUCTURES
;<1A-UTILITIES>DLUSER.MAC.19, 6-MAY-76 10:52:08, EDIT BY HURLEY
;<1A-UTILITIES>DLUSER.MAC.13, 8-APR-76 11:07:35, EDIT BY HURLEY
;TCO 1244 - ADD .DIRECT .XTABM FOR MACRO 50 ASSEMBLIES
;<V-SOURCES>DLUSER.MAC.12, 16-MAR-76 14:44:26, EDIT BY KIRSCHEN
;TCO 1181 - CREATE DEFAULT FILE ON DUMP COMMAND WITH PROTECTION 770000
;<V-SOURCES>DLUSER.MAC;9, 6-SEP-75 19:10:22, EDIT BY HELLIWELL
;THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED
; OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE.
;
;COPYRIGHT (C) 1976, 1977, 1978 BY DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.
;DUMP/LOAD USER INFORMATION - D. MURPHY
;NOTE: REQUIRES OPERATOR OR WHEEL CAPABILITY
TITLE DLUSER
SEARCH MONSYM, MACSYM
IFNDEF .PSECT,<
.DIRECT .XTABM>
.REQUIRE SYS:MACREL
SALL
T1=1
T2=2
T3=3
T4=4
P=17
GB=16
P2=15
P1=14
IO=11
INTERN START,LODUSR,DMPUSR
;ENTRY VECTOR
PRGCST==0 ;CUSTOMER ID
PRGVER==3 ;VERSION NUMBER
PRGMIN==0 ;MINOR VERSION
PRGEDT==4 ;EDIT NUMBER
ENTVEC: JRST START ;MAIN START
JRST PARSE ;REENTER ADDRESS
PRGCST_^D33+PRGVER_^D24+PRGMIN_^D18+PRGEDT
DEFINE LS (NM,SZ)
<NM: BLOCK SZ
>
NPDL==20 ;SIZE OF THE STACK
LS PDL,NPDL ;THE STACK
LS JFN,1 ;JFN OF FILE FOR INPUT OR OUTPUT
EBUFLN==.CDDAC+1 ;LENGTH OF EBUF
LS EBUF,EBUFLN ;ARGUMENT BLOCK FOR GTDIR OR CRDIR
LS NAMBUF,21 ;CONTAINS STR:<*> ON DUMP, STR:<DIRECTORY> ON LOAD
LS NAMPTR,1 ;POINTER INTO NAMBUF
LS DIRNAM,21 ;CONTAINS STR:<DIRECTORY> ON DUMP
LS DIRNUM,1 ;DIRECTORY NUMBER
LS PASBUF,11 ;CONTAINS PASSWORD
LS ACTBUF,11 ;CONTAINS DIRECTORY DEFAULT ACCOUNT
LS STRDV,1 ;DEVICE DESIGNATOR FOR STRUCTURE TO USE
LS USERNO,1 ;USER NUMBER CURRENTLY WORKING ON (FOR CTRL/A)
;LOCATIONS FOR STORING PC WHEN PROCESSING INTERRUPTS
LS RET1,1
LS RET2,1
LS RET3,1 ;INTERUPT PC TABLE
;GROUP BLOCKS. EACH CONTAINS COUNT + 1000 WORDS + 1 WORD FOR ZERO AT END
GRPSIZ== 1000 ;SIZE OF GROUP BLOCK
LS UGROUP,GRPSIZ+1+1 ;USER GROUPS
LS DGROUP,GRPSIZ+1+1 ;DIRECTORY GROUPS
LS CRTGRP,GRPSIZ+1+1 ;GROUPS FOR SUBDIRECTORIES
;DEFINITIONS FOR COMMAND PARSING USING COMND JSYS
;TB - MACRO TO SET UP COMMAND TABLE
DEFINE TB (DAT,TXT)<
XWD [ASCIZ /TXT/],DAT>
;ADDRESSES FOR HANDLING EACH COMMAND
CMDTAB:
CMDSIZ,,CMDMAX ;NUMBER COMMANDS, MAXIMUM NUMBER
TB (.DUMP,DUMP) ;DUMP DIRECTORIES TO FILE
TB (.EXIT,EXIT) ;QUIT
TB (.HELP,HELP) ;TYPE INFORMATION ABOUT DLUSER
TB (.LOAD,LOAD) ;LOAD DIRECTORIES INTO SYSTEM FROM FILE
TB (.STR,STRUCTURE) ;SPECIFY STRUCTURE TO OPERATE ON
CMDSIZ==.-CMDTAB
CMDMAX==CMDSIZ ;MAXIMUM NUMBER OF COMMANDS
NCHPW==5 ;NUMBER OF CHARACTERS PER WORD
PROMPT: ASCIZ /DLUSER>/ ;PROMPT
CMDBLK: BLOCK .CMGJB+5 ;COMMAND STATE BLOCK (LEAVE ROOM FOR GROWTH)
GJFSIZ==.GJRTY+2
GTJBLK: BLOCK GJFSIZ ;GTJFN BLOCK (USED BY COMND)
BUFSIZ==150
BUFFER: BLOCK BUFSIZ ;BUFFER USER TYPES COMMAND INTO
ATMSIZ==BUFSIZ
ATMBUF: BLOCK ATMSIZ ;BUFFER THAT COMND STORES LAST FIELD INTO
;ERROR - MACRO TO PRINT ERROR AND GO TO SPECIFIED LOCATION
DEFINE ERROR (ADDR,MSG)<
JRST [ HRROI T1,[ASCIZ /
? MSG
/]
PSOUT
JRST ADDR]>
;TXTPTR- MACRO TO SET UP BYTE POINTER TO A STRING
DEFINE TXTPTR (MSG) <POINT 7,[ASCIZ/MSG/]>
START: MOVE P,[IOWD NPDL,PDL]
RESET
HRROI 1,NAMBUF ;INIT STR PNTR
MOVEM 1,NAMPTR
MOVEI T1,.FHSLF
RPCAP ;GET PROCESS CAPABILITIES
TXNN T3,SC%WHL!SC%OPR
JRST [ TMSG < ?WHEEL or OPERATOR capability required
>
HALTF
JRST START]
MOVEI T1,.FHSLF
CIS ;SET UP INTERUPT SYSTEM
EIR
MOVE T2,[LEVTAB,,CHNTAB]
SIR
MOVX T2,1B1 ;PUT ^A ON 1
AIC
MOVE T1,[1,,1]
ATI ;ASSIGN TERMINAL CODE
;HERE TO START A NEW COMMAND.SET UP THE COMMAND STATE BLOCK
PARSE: SETZM USERNO ;NONE YET
MOVEI T2,CMDBLK ;POINT TO START OF COMMAND STATE BLOCK
MOVEI T1,PARSE2 ;TRANSFER IF USER DELETES PREVIOUSLY PARSED STUFF
MOVEM T1,.CMFLG(T2)
MOVE T1,[.PRIIN,,.PRIOU] ;JFN'S FOR USER INPUT AND OUTPUT
MOVEM T1,.CMIOJ(T2)
HRROI T1,PROMPT ;POINTER TOPROMPT STRING
MOVEM T1,.CMRTY(T2)
HRROI T1,BUFFER ;POINTER TO START OF USER INPUT
MOVEM T1,.CMBFP(T2)
MOVEM T1,.CMPTR(T2) ;POINTER TO NEXT FIELD
MOVEI T1,BUFSIZ*NCHPW ;SPACE REMAINING IN BUFFER
MOVEM T1,.CMCNT(T2)
SETZM .CMINC(T2) ;NUMBER OF UNPARSED CHARACTERS
HRROI T1,ATMBUF ;POINTER TO ATOM BUFFER
MOVEM T1,.CMABP(T2)
MOVEI T1,ATMSIZ*NCHPW ;NUMBER CHARACTERS IN ATOM BUFFER
MOVEM T1,.CMABC(T2)
MOVEI T1,GTJBLK ;ADDRESS OF GTJFN BLOCK
MOVEM T1,.CMGJB(T2)
;HERE WHEN ERROR OCCURS AND NEED TO START OVER. REINIT THE COMND JSYS
PARSE1:
MOVEI T1,CMDBLK ;T1/ADDRESS OF COMMAND STATE BLOCK
MOVEI T2,[FLDDB. (.CMINI)] ;T2/ADDRESS OF FUNCTION DESCRIPTOR BLOCK
COMND ;INIT THE COMND JSYS
;HERE WHEN USER RUBOUTS INTO PREVIOUSLY GOTTEN TEXT
PARSE2: MOVE T1,[CZ%NCL+.FHSLF];WE WANT TO RELEASE ALL JFN'S
CLZFF ;DO IT
MOVEI T1,CMDBLK ;T1/ADDRESS OF COMMAND STATE BLOCK
MOVEI T2,[FLDDB.(.CMKEY,,CMDTAB)] ;T2/ADDRESS OF FDB
COMND ;LOOK FOR A KEYWORD
TXNE T1,CM%NOP ;DID WE FIND ONE?
ERROR PARSE1,<NOT A DLUSER COMMAND> ;NO. START OVER
HRRZ T1,(T2) ;YES. GO PROCESS IT
JRST (T1)
PARSE3: JRST PARSE ;GET NEXT COMMAND
SUBTTL DUMP (TO FILE) FILESPEC
;USER WANTS TO DUMP DIRECTORIES TO A FILE. GET NAME OF FILE
.DUMP:
MOVEI T1,CMDBLK ;T1/ADDRESS OF COMMAND STATE BLOCK
MOVEI T2,[FLDDB. (.CMNOI,,TXTPTR <TO FILE>)];T2/ADDRESS OF FDB
COMND ;TYPE NOISE WORD IF NEEDED
MOVE T1,[GTJBLK,,GTJBLK+1] ;SET UP TO CLEAR GTJFN BLOCK
SETZM GTJBLK ;CLEAR FIRST WORD OF BLOCK
BLT T1,GTJBLK+GJFSIZ-1 ;CLEAR GTJFN BLOCK
HRROI T1,[ASCIZ/USERS/] ;GET DEFAULT FILENAME
MOVEM T1,GTJBLK+.GJNAM ;SAVE DEFAULT FILE NAME
HRROI T1,[ASCIZ/TXT/] ;GET POINTER TO DEFAULT FILE TYPE
MOVEM T1,GTJBLK+.GJEXT ;SAVE DEFAULT FILE TYPE POINTER
HRROI T1,[ASCIZ/770000/] ;GET DEFAULT PROTECTION
MOVEM T1,GTJBLK+.GJPRO ;SAVE DEFAULT PROTECTION
MOVX T1,GJ%FOU ;GET "FOR-OUTPUT-USE" FLAG
MOVEM T1,GTJBLK+.GJGEN ;SAVE FLAGS
MOVEI T1,CMDBLK ;T1/ADDRESS OF COMMAND STATE BLOCK
MOVEI T2,[FLDDB. (.CMFIL)] ;GET FILESPEC FDB FOR COMND
COMND ;GET OUTPUT FILE
TXNE T1,CM%NOP ;DID WE GET A GOOD FILE NAME
JRST [ JSERR ;FAILED. REPORT ERROR
JRST PARSE1]
HRRZM T2,JFN ;YES. SAVE THE JFN
MOVEI T1,CMDBLK ;T1/ADDRESS OF COMMAND STATE BLOCK
MOVEI T2,[FLDDB. (.CMCFM)] ;T2/ADDRESS OF FUNCTION DESCRIPTOR BLOCK
COMND ;GET CONFIRMATION
TXNE T1,CM%NOP ;DID WE GET IT?
ERROR PARSE1,<INVALID COMMAND CONFIRMATION> ;NO. START OVER
;OPEN THE FILE
MOVE T1,JFN ;T1/JFN OF OUTPUT FILE
MOVX T2,<OF%WR+FLD(7,OF%BSZ)> ;T2/OPEN FOR WRITE, 7-BIT BYTES
OPENF ;OPEN FILE TO DUMP ONTO
JRST [ JSERR ;FAILED. REPORT ERROR
JRST PARSE1] ;START THE LINE OVER
JRST DMPUSR
;SUBROUTINE TO DUMP ALL DIRECTORIES ONTO SPECIFIED FILE
;IF A STRUCTURE WAS SPECIFIED, NAMBUF CONTAINS THE STRUCTURE NAME.
;IF NOT, IT IS ZEROED. NAMPTR POINTS TO THE NEXT AVAILABLE LOCATION
;IN NAMBUF.
DMPUSR: MOVE T1,NAMPTR ;T1/ POINTER TO END OF STRUCTURE
HRROI T2,[ASCIZ /<*>/] ;T2/ POINTER TO DIRECTORY SPEC
SETZ T3, ;T3/ STOP ON NULL
SOUT ;APPEND <*> TO STRUCTURE NAME
MOVX T1,RC%AWL ;T1/ ALLOW WILD CARD
HRROI T2,NAMBUF ;T2/ POINT TO STR:<*>
RCDIR ;GET THE FIRST DIRECTORY
ERJMP [ TMSG <
?Unable to get first directory>
JSERR
JRST PARSE]
TXNE T1,RC%NOM!RC%AMB!RC%NMD ;ANY ERROR CONDITIONS?
JRST [ TMSG <
?Unable to get first directory>
HALTF
JRST PARSE]
MOVEM T3,DIRNUM ;NO. SAVE DIRECTORY NUMBER
HRROI T1,DIRNAM ;T1/ POINT TO BUFFER FOR OUTPUT
MOVE T2,T3 ;T2/ DIRECTORY NUMBER
DIRST ;STORE STRUCTURE:<DIRECTORY>
JSHLT ;FAILED. SHOULDN'T HAPPEN
;PRINT A ONE-TIME HEADER INDICATING STRUCTURE BEING DUMPED AND
;FORMAT OF OUTPUT
MOVE T1,JFN ;OUTPUT FILE
HRROI T2,[ASCIZ "Dump of all directories on: "]
SETZ T3,
SOUT ;OUTPUT COMMENT
MOVE T1,JFN
HRROI T2,DIRNAM ;T2/ SOURCE IS DIRECTORY NAME
MOVEI T3,7 ;T3/ DEVICE NAME CAN'T EXCEED 6 CHARACTERS
MOVEI T4,":" ;T4/ STOP WITH DEVICE TERMINATOR
SOUT ;PRINT THE STRUCTURE NAME
HRROI T2,FORMAT
SETZ T3,
SOUT ;OUTPUT DESCR
;LOOP THROUGH DIRECTORIES, GETTING THEIR DIRECTORY INFO AND COPYING
;IT TO THE OUTPUT FILE
DMPUS3: MOVE T1,DIRNUM ;T1/ DIRECTORY #
MOVEM T1,USERNO ;SAVE FOR ^A WATCHERS
MOVEI T2,EBUFLN ;GET LENGTH OF BUFFER "EBUF"
MOVEM T2,EBUF+.CDLEN ;STORE COUNT IN BLOCK FOR GTDIR
MOVEI T2,EBUF ;T2/ WHERE TO STORE DIRECTORY INFO
HRROI T3,PASBUF ;T3/ WHERE TO STORE PASSWORD
;SET UP POINTERS FOR GROUP LISTS. ARGUMENT BLOCK FOR GTDIR CONTAINS
;ADDRESS OF BLOCK INTO WHICH GTDIR COPIES GROUP NUMBERS. THE DESTINATION
;BLOCK CONTAINS ITS SIZE IN THE FIRST WORD. THIS CODE ZEROES THE
;DESTINATION BLOCK, STORES ITS SIZE IN THE FIRST WORD, AND STORES A
;POINTER TO THE DESTINATION IN THE GTDIR ARGUMENT BLOCK
MOVE P1,[UGROUP,,UGROUP+1] ;GET SOURCE,,DESTINATION
SETZM UGROUP ;CLEAR FIRST WORD OF GROUP BLOCK
BLT P1,UGROUP+GRPSIZ-1 ;CLEAR ENTIRE USER GROUP BLOCK
MOVE P1,[DGROUP,,DGROUP+1] ;GET SOURCE,,DESTINATION
SETZM DGROUP ;CLEAR FIRST WORD OF GROUP BLOCK
BLT P1,DGROUP+GRPSIZ-1 ;CLEAR ENTIRE DIRECTORY GROUP BLOCK
MOVE P1,[CRTGRP,,CRTGRP+1] ;GET SOURCE,,DESTINATION
SETZM CRTGRP ;CLEAR FIRST WORD OF GROUP BLOCK
BLT P1,CRTGRP+GRPSIZ-1 ;CLEAR ENTIRE CREATABLE GROUP BLOCK
MOVEI P1,UGROUP ;GET ADR OF USER GROUP BLOCK
MOVEM P1,EBUF+.CDUGP ;STORE BLOCK ADR FOR GTDIR
MOVEI P1,DGROUP ;GET ADR OF DIR GROUP BLOCK
MOVEM P1,EBUF+.CDDGP ;STORE BLOCK ADR FOR GTDIR
MOVEI P1,CRTGRP ;GET ADDRESS OF CREATABLE GROUP BLOCK
MOVEM P1,EBUF+.CDCUG ;STORE BLOCK ADDRESS FOR GTDIR
MOVEI P1,GRPSIZ ;GET SIZE OF GROUP BLOCK
MOVEM P1,UGROUP ;STORE SIZE OF BLOCK IN FIRST WORD
MOVEM P1,DGROUP ;DITTO FOR DIR GROUP BLOCK
MOVEM P1,CRTGRP ;DITTO FOR CREATABLE GROUP BLOCK
HRRI P1,ACTBUF ;ADDRESS OF DEFAULT ACCT BUFFER
HRLI P1,(<POINT 7,>)
MOVEM P1,EBUF+.CDDAC ;STORE POINTER FOR GTDIR
GTDIR ;GET PASSWORD AND DIRECTORY PARAMS
ERJMP [CALL DIRERR ;FAILED. PRINT MESSAGE AND FIND REASON
JRST PARSE ;NOT ENOUGH PRIVILEGE. ABORT COMMAND
JRST DMPUS1] ;PROBLEM WITH INDIVIDUAL DIRECTORY. CONTINUE
;OUTPUT HEADER FOR THIS DIRECTORY FOLLOWED BY PASSWORD
MOVE T1,JFN ;T1/ DESTINATION IS OUTPUT FILE
MOVEI T2,"&"
BOUT ;MARK START OF NAME
HRROI T2,DIRNAM ;T2/ SOURCE IS DIRECTORY NAME
SETZ T3,
SOUT ;OUTPUT NAME
HRROI T2,[ASCIZ /
/]
SOUT
HRROI T2,PASBUF ;PASSWORD
SOUT
;OUTPUT REST OF INFORMATION STARTING WITH LOGGED IN QUOTA
;EACH ITEM IS PRECEDED BY <CR><LF><SPACE>.
MOVSI 7,-<.CDLLD-.CDLIQ+1> ;7/-COUNT,,POINTER TO GTDIR BLOCK
DMPUS2: HRROI T2,[ASCIZ /
/]
SETZ T3,
SOUT ;MARK BEGINNING OF ITEM
MOVE T2,EBUF+2(7) ;GET NEXT ITEM
MOVE T3,[1B0+10] ;OUTPUT MAGNITUDE, OCTAL
NOUT ;OUTPUT THE DATA
JSHLT
AOBJN 7,DMPUS2 ;LOOP THROUGH DATA UP TO GROUPS
;DUMP THE USER GROUPS PRECEDED BY <CR><LF><SPACE>
HRROI T2,[ASCIZ/
/]
SETZM 3 ;TERMINATE ON NULL
SOUT
MOVEI GB,UGROUP ;GET ADR OF USER GROUP BLOCK
CALL DMPGRP ;GO DUMP USER GROUPS
;DUMP THE DIRECTORY GROUPS PRECEDED BY <CR><LF><SPACE>
HRROI T2,[ASCIZ/
/]
SETZM 3 ;TERMINATE ON NULL
SOUT
MOVEI GB,DGROUP ;GET ADR OF DIR GROUP BLOCK
CALL DMPGRP ;GO DUMP DIRECTORY GROUPS
;DUMP THE NUMBER OF ALLOWED SUBDIRECTORIES
HRROI T2,[ASCIZ /
/]
SETZ T3,
SOUT ;MARK BEGINNING OF FIELD
MOVE T2,EBUF+.CDSDQ ;GET NUMBER OF ALLOWED SUBDIRECTORIES
MOVX T3,NO%MAG+<FLD(10,NO%RDX)> ;PRINT MAGNITUDE, OCTAL NUMBER
NOUT ;OUTPUT MAXIMUM SUBDIRECTORIES
JSHLT ;FAILED. SHOULDN'T HAPPEN
;DUMP CREATABLE USER GROUPS PRECEDED BY <CR><LF><SPACE>
HRROI T2,[ASCIZ/
/]
SETZ T3, ;STOP ON NULL
SOUT ;MARK BEGINNING OF ITEM
MOVEI GB,CRTGRP ;GET ADDRESS OF GROUP LIST
CALL DMPGRP ;GO OUTPUT THE LIST
;DUMP THE DEFAULT DIR ACCOUNT PRECEDED BY <CR><LF>
MOVE T1,JFN ;DESTINATION IS OUTPUT FILE
HRROI T2,[ASCIZ/
/]
SETZ T3, ;STOP ON NULL
SOUT
HRROI T2,ACTBUF
SETZ T3,
SOUT ;OUTPUT THE DEFAULT ACCOUNT
;END THE WHOLE THING WITH <CR><LF>
HRROI T2,[ASCIZ/
/]
SETZ T3, ;STOP ON NULL
SOUT
;DONE WITH THIS DIRECTORY. STEP TO THE NEXT ONE
DMPUS1: MOVX T1,RC%AWL!RC%STP ;T1/ ALLOW WILD CARD, STEP
HRROI T2,NAMBUF ;T2/ POINT TO STR:<*>
MOVE T3,DIRNUM ;T3/ DIRECTORY NUMBER LAST RETURNED
RCDIR ;GET THE NEXT DIRECTORY
ERJMP [ TMSG <
?Unable to get next directory>
HALTF
JRST PARSE]
TXNE T1,RC%NOM!RC%AMB ;ANY PROBLEM OTHER THAN NO MORE DIRECTORIES?
JRST [ TMSG <
?Unable to get next directory>
HALTF
JRST PARSE]
TXNE T1,RC%NMD ;NO. ANY MORE DIRECTORIES?
JRST DONE ;NO. ALL DONE
MOVEM T3,DIRNUM ;YES. SAVE DIRECTORY NUMBER FOR STEPPING
HRROI T1,DIRNAM ;T1/ POINT TO OUTPUT FOR DIRST
MOVE T2,T3 ;T2/ DIRECTORY NUMBER
DIRST ;GET DIRECTORY NAME INCLUDING STRUCTURE
JSHLT ;FAILED. SHOULDN'T HAPPEN
JRST DMPUS3 ;GO DO THE DIRECTORY
;DIRERR - ROUTINE TO PRINT ERROR AFTER GTDIR FAILS.
;NOTE: GETER CLOBBERS 4-10
; CALL DIRERR
;RETURNS +1:LACK OF PRIVILEGE
; +2:PROBLEM WITH ONE DIRECTORY
DIRERR: TMSG<
?JSYS ERROR:>
MOVEI T1,.FHSLF ;T1/CURRENT FORK
GETER ;GET LAST ERROR
MOVEI T1,.PRIOU ;T1/PRIMARY OUTPUT
SETZ T3, ;T3/NO LIMIT ON LENGTH OF MESSAGE
ERSTR ;PRINT MESSAGE FOR ERROR IN T2
JFCL ;FAILED
JFCL ;FAILED
MOVEI T2,(T2) ;GET ERROR CODE
CAIN T2,GTDIX1 ;IS IT LACK OF OPERATOR OR WHEEL PRIVILEGE?
JRST [TMSG<
> ;YES. QUIT.
RET]
TMSG < - > ;NO. PRINT AND CONTINUE
HRROI T1,DIRNAM ;T1/POINTER TO DIRECTORY NAME
PSOUT ;PRINT THE DIRECTORY NAME
TMSG <
>
RETSKP ;SKIP RETURN
; ROUTINE TO DUMP USER OR DIRECTORY GROUPS
; ACCEPTS GB/ ADDRESS OF GROUP BLOCK
; CALL DMPGRP
; RETURNS +1 ALWAYS
DMPGRP: MOVEI P1,1(GB) ;COPY ADR OF FIRST GROUP BLOCK
MOVE 1,JFN ;GET OUTPUT JFN
MOVEI 3,^D10 ;DECIMAL RADIX
MOVEI P2,GRPSIZ ;# OF WORDS IN GROUP BLOCK
MOVE 2,(P1) ;GET FIRST WORD OF BLOCK
JRST DMPGP2 ;GO DO FIRST GROUP
DMPGP1: MOVEI 2,"," ;GET DELIMITER
BOUT ;OUTPUT THE COMMA
MOVE 2,(P1) ;GET GROUP # AGAIN
MOVE 1,JFN ;GET JFN BACK
DMPGP2: NOUT ;OUTPUT THE GROUP #
JSHLT ;UNEXPECTED ERROR
JUMPE 2,R ;QUIT ON ZERO
SOJLE P2,DMPGP3 ;GROUP BLOCK IS TOO SMALL ?
AOJA P1,DMPGP1 ;GO OUTPUT NEXT PAIR OF GROUPS
DMPGP3: TMSG <
? GROUP BLOCK IS TOO SMALL, ABORTING ...
>
HALTF
JRST .-1
FORMAT: ASCIZ /
STR:<DIRECTORY-NAME>
PASSWORD
LOGGED IN QUOTA
CAPABILITIES
FILES ONLY, ALPHA ACCTS, REPEAT LMSG
LOGGED OUT QUOTA
DIRECTORY NUMBER
DEFAULT FILE PROTECTION
DIRECTORY PROTECTION
DEFAULT RETENTION SPECIFICATION
LAST LOGIN
USER GROUPS
DIRECTORY GROUPS
MAXIMUM SUBDIRECTORIES
CREATABLE USER GROUPS
DEFAULT DIRECTORY ACCOUNT
/
SUBTTL EXIT (TO MONITOR)
;USER WANTS TO QUIT. GET CONFIRMATION AND EXIT
.EXIT:
MOVEI T1,CMDBLK ;T1/ADDRESS OF COMMAND STATE BLOCK
MOVEI T2,[FLDDB. (.CMNOI,,TXTPTR <TO MONITOR>)];T2/ADDRESS OF FDB
COMND ;TYPE NOISE WORD IF NEEDED
MOVEI T1,CMDBLK ;T1/ADDRESS OF COMMAND STATE BLOCK
MOVEI T2,[FLDDB. (.CMCFM)] ;T2/ADDRESS OF FUNCTION DESCRIPTOR BLOCK
COMND ;GET CONFIRMATION
TXNE T1,CM%NOP ;DID WE GET IT?
ERROR PARSE1,<INVALID COMMAND CONFIRMATION> ;NO
SETOM T1 ;T1/INDICATES ALL FILES
CLOSF ;CLOSE ALL OPEN FILES
JSERR ;PRINT ERROR AND CONTINUE
HALTF ;RETURN TO MONITOR
JRST START ;IF CONTINUED, START OVER
SUBTTL STRUCTURE (TO USE)
;USED TO SPECIFY STR OTHER THAN DEFAULT
.STR: HRROI T1,NAMBUF ;INIT POINTER
MOVEM T1,NAMPTR
MOVEI T1,CMDBLK ;COMND INFO
MOVEI T2,[FLDDB. (.CMNOI,,TXTPTR <TO USE>)]
COMND
MOVEI T2,[FLDDB. (.CMDEV,CM%SDH,,<STRUCTURE NAME>,<DSK>)]
COMND
TXNE T1,CM%NOP ;LOSAGE?
ERROR PARSE1,<INVALID STRUCTURE NAME GIVEN>
MOVEM T2,STRDV ;SAVE DESIGNATOR A WHILE
MOVEI T2,[FLDDB. (.CMCFM)]
COMND
TXNE T1,CM%NOP
ERROR PARSE1,<INVALID COMMAND CONFIRMATION>
MOVE T1,STRDV ;GET DEVICE DESIGNATOR
DVCHR
LDB T1,[POINTR T2,DV%TYP]
CAIE T1,.DVDSK ;GRNTEE DISK
ERROR PARSE1,<INVALID STRUCTURE NAME GIVEN>
MOVE T2,STRDV ;DEVICE DESIGNATOR
MOVE T1,NAMPTR ;GET PNTR
DEVST ;GET STRING
JRST [ JSERR
JRST PARSE] ;START OVER
MOVEI T2,":" ;TERMINATE WITH COLON
IDPB T2,T1 ;...
MOVEM T1,NAMPTR ;UPDATE PNTR
JRST PARSE3 ;GET NEXT COMMAND
SUBTTL HELP
;USER WANTS AN EXPLANATION
.HELP: MOVEI T1,CMDBLK ;T1/ADDRESS OF COMMAND STATE BLOCK
MOVEI T2,[FLDDB. (.CMCFM)] ;T2/ ADDRE