

; Bliss-32 10.1-416	Monday 21-AUG-1978 23:12:12	DBB3:[F11B.SRC]DELETE.B32;9					Page 1

;

;	0001	MODULE DELETE (

;	0002			LANGUAGE (BLISS32),

;	0003			IDENT = 'B0016'

;	0004			) =

;	0005	BEGIN

;	0006	

;	0007	!

;	0008	! Copyright (c) 1977

;	0009	! Digital Equipment Corporation, Maynard, Massachusetts 01754

;	0010	!

;	0011	! This software is furnished  under a license for use only on a single

;	0012	! computer  system and  may be  copied only with  the inclusion of the

;	0013	! above copyright notice.  This software, or any other copies thereof,

;	0014	! may not be provided or  otherwise made available to any other person

;	0015	! except for use on such system and to one who agrees to these license

;	0016	! terms.  Title to and  ownership of the  software  shall at all times

;	0017	! remain in DEC.

;	0018	!

;	0019	! The information in this software is subject to change without notice

;	0020	! and should  not be construed  as a commitment  by Digital  Equipment

;	0021	! Corporation.

;	0022	!

;	0023	! DEC assumes  no  responsibility  for  the use or  reliability of its

;	0024	! software on equipment which is not supplied by DEC.

;	0025	

;	0026	!++

;	0027	!

;	0028	! FACILITY:  F11ACP Structure Level 2

;	0029	!

;	0030	! ABSTRACT:

;	0031	!

;	0032	!	This routine performs the DELETE function.

;	0033	!

;	0034	! ENVIRONMENT:

;	0035	!

;	0036	!	STARLET operating system, including privileged system services

;	0037	!	and internal exec routines.

;	0038	!

;	0039	!--

;	0040	!

;	0041	!

;	0042	! AUTHOR:  Andrew C. Goldstein,	 CREATION DATE:  1-Apr-1977

;	0043	!

;	0044	! REVISION HISTORY:

;	0045	!

;	0046	!   Andrew C. Goldstein, 7-Apr-1977  13:31

;	0047	!   X0002 - Break out MARK_DELETE routine, do deletion in line

;	0048	!

;	0049	!   Andrew C. Goldstein, 12-Apr-1977  15:24

;	0050	!   X0003 - Modify for buffer manager

;	0051	!

;	0052	!   Andrew C. Goldstein, 21-Apr-1977  14:41

;	0053	!   X0004 - Move GETFIB out of kernel mode

;	0054	!

;	0055	!   Andrew C. Goldstein, 3-May-1977  15:06



; Bliss-32 10.1-416	Monday 21-AUG-1978 23:12:12	DBB3:[F11B.SRC]DELETE.B32;9					Page 1-1

;

;	0056	!   X0005 - Add file protection check

;	0057	!

;	0058	!   Andrew C. Goldstein, 11-May-1977  13:33

;	0059	!   X0006 - Check for reserved file ID

;	0060	!

;	0061	!   Andrew C. Goldstein, 11-May-1977  15:17

;	0062	!   X0007 - Globalize MARKDEL_FCB

;	0063	!

;	0064	!   Andrew C. Goldstein, 13-Jul-1977  15:40

;	0065	!   X0008 - Rework file header checksumming

;	0066	!

;	0067	!   Andrew C. Goldstein, 2-Aug-1977  14:54

;	0068	!   X0009 - Deallocate extension FCB's in MARKDEL_FCB

;	0069	!

;	0070	!   Andrew C. Goldstein, 12-Dec-1977  13:28

;	0071	!   X0010 - file ID interface changes

;	0072	!

;	0073	!   Andrew C. Goldstein, 14-Dec-1977  14:34

;	0074	!   X0011 - Modify for structure level 2

;	0075	!

;	0076	!   Andrew C. Goldstein, 9-Jan-1978  11:44

;	0077	!   B0012 - Protect against deletion of write accessed file

;	0078	!

;	0079	!   Andrew C. Goldstein, 17-Jan-1978  2:17

;	0080	!   B0013 - Fix reserved file test

;	0081	!

;	0082	!   Andrew C. Goldstein, 21-Jun-78  17:32

;	0083	!   B0014 - Add allocation interlock

;	0084	!

;	0085	!   Andrew C. Goldstein, 12-Jul-78  21:13

;	0086	!   B0015 - Add deletion logger

;	0087	!

;	0088	!   Andrew C. Goldstein, 18-Aug-78  14:19

;	0089	!   B0016 - Tie off delete logger

;	0090	!

;	0091	!**

;	0092	

;	0093	

;	0094	LIBRARY 'SYS$LIBRARY:LIB.L32';

;	0095	REQUIRE 'SRC$:FCPDEF.B32';

;	0444	

;	0445	

;	0446	FORWARD ROUTINE

;	0447		DELETE,				! main delete function

;	0448		MARK_DELETE	: NOVALUE,	! mark file for delete

;	0449		MARKDEL_FCB;			! mark FCB of file for delete



; Bliss-32 10.1-416	Monday 21-AUG-1978 23:12:12	DBB3:[F11B.SRC]DELETE.B32;9					Page 2

;

;	0450	GLOBAL ROUTINE DELETE =

;	0451	

;	0452	!++

;	0453	!

;	0454	! FUNCTIONAL DESCRIPTION:

;	0455	!

;	0456	!	This routine performs the remove and mark for delete functions.

;	0457	!

;	0458	! CALLING SEQUENCE:

;	0459	!	DELETE ()

;	0460	!

;	0461	! INPUT PARAMETERS:

;	0462	!	NONE

;	0463	!

;	0464	! IMPLICIT INPUTS:

;	0465	!	IO_PACKET: I/O packet in process

;	0466	!

;	0467	! OUTPUT PARAMETERS:

;	0468	!	PRIMARY_FCB: FCB of file

;	0469	!

;	0470	! IMPLICIT OUTPUTS:

;	0471	!	NONE

;	0472	!

;	0473	! ROUTINE VALUE:

;	0474	!	1

;	0475	!

;	0476	! SIDE EFFECTS:

;	0477	!	directory entry removed

;	0478	!	file marked for delete or deleted

;	0479	!

;	0480	!--

;	0481	

;	0482	BEGIN

;	0483	

;	0484	LOCAL

;	0485		ABD		: REF BBLOCKVECTOR [,ABD$C_LENGTH],

;	0486						! buffer descriptors

;	0487		FIB		: REF BBLOCK;	! FIB

;	0488	

;	0489	EXTERNAL

;	0490		CLEANUP_FLAGS	: BITVECTOR,	! cleanup action flags

;	0491		IO_PACKET	: REF BBLOCK,	! I/O packet in process

;	0492		CURRENT_WINDOW	: REF BBLOCK,	! window of open file

;	0493		PRIMARY_FCB	: REF BBLOCK,	! FCB of file

;	0494		CURRENT_VCB	: REF BBLOCK;	! VCB of volume

;	0495	

;	0496	EXTERNAL ROUTINE

;	0497		GET_FIB,			! get FIB of request

;	0498		FIND,				! find name in directory

;	0499		SEARCH_FCB;			! search FCB list

;	0500	

;	0501	

;	0502	! First find the buffer descriptor, FIB, FCB, etc. then remove the

;	0503	! directory entry.

;	0504	!



; Bliss-32 10.1-416	Monday 21-AUG-1978 23:12:12	DBB3:[F11B.SRC]DELETE.B32;9					Page 2-1

;

;	0505	

;	0506						! pointer to buffer descriptors

;	0507	ABD = .BBLOCK [.IO_PACKET[IRP$L_SVAPTE], AIB$L_DESCRIPT];

;	0508	FIB = GET_FIB (.ABD);

;	0509	

;	0510	IF .CURRENT_VCB[VCB$V_NOALLOC]

;	0511	THEN ERR_EXIT (SS$_WRITLCK);

;	0512	

;	0513	! If a directory ID is present, do a directory search first and remove

;	0514	! the directory entry.

;	0515	!

;	0516	

;	0517	IF .CLEANUP_FLAGS[CLF_DIRECTORY]

;	0518	THEN FIND (.ABD, .FIB, 1);

;	0519	

;	0520	! If there is a file open on the channel, check the file ID returned by the

;	0521	! FIND against that of the open file. If they do not match, treat the file

;	0522	! as if it were not open.

;	0523	!

;	0524	

;	0525	IF .PRIMARY_FCB NEQ 0

;	0526	THEN

;	0527	    BEGIN

;	0528	    IF .PRIMARY_FCB[FCB$W_FID_NUM] NEQ .FIB[FIB$W_FID_NUM]

;	0529	    OR .PRIMARY_FCB[FCB$W_FID_SEQ] NEQ .FIB[FIB$W_FID_SEQ]

;	0530	    THEN CURRENT_WINDOW = 0;

;	0531	    END;

;	0532	

;	0533	PRIMARY_FCB = SEARCH_FCB (FIB[FIB$W_FID]);

;	0534	

;	0535	! Now actually mark the file for delete if requested.

;	0536	!

;	0537	

;	0538	IF .BBLOCK [IO_PACKET[IRP$W_FUNC], IO$V_DELETE]

;	0539	THEN MARK_DELETE (.FIB);

;	0540	

;	0541	RETURN 1;

;	0542	

;	0543	END;					! end of routine DELETE





							    .TITLE  DELETE

							    .IDENT  \B0016\



							    .EXTRN  CLEANUP_FLAGS, IO_PACKET, CURRENT_WINDOW, PRIMARY_FCB

							    .EXTRN  CURRENT_VCB, GET_FIB, FIND, SEARCH_FCB



							    .PSECT  $CODE$,NOWRT,2



					 000C 00000 	    .ENTRY  DELETE, Save R2,R3					      ; 0450

		         50 	0000G  CF  D0 00002 	    MOVL    IO_PACKET, R0					      ; 0507

		         53 	  2C   B0  D0 00007 	    MOVL    @44(R0), ABD					      ;

				       53  DD 0000B 	    PUSHL   ABD							      ; 0508

		  0000G  CF	       01  FB 0000D 	    CALLS   #1, GET_FIB						      ;

		         52 	       50  D0 00012 	    MOVL    R0, FIB						      ;



; Bliss-32 10.1-416	Monday 21-AUG-1978 23:12:12	DBB3:[F11B.SRC]DELETE.B32;9					Page 2-2

;

		         50 	0000G  CF  D0 00015 	    MOVL    CURRENT_VCB, R0					      ; 0510

	   06 	    0B   A0	       04  E1 0001A 	    BBC     #4, 11(R0), 1$					      ;

				025C   8F  BF 0001F 	    CHMU    #604						      ; 0511

				       4B  11 00023 	    BRB     6$							      ;

	   0B 	  0000G  CF	       06  E1 00025 1$:     BBC     #6, CLEANUP_FLAGS, 2$				      ; 0517

				       01  DD 0002B 	    PUSHL   #1							      ; 0518

				       52  DD 0002D 	    PUSHL   FIB							      ;

				       53  DD 0002F 	    PUSHL   ABD							      ;

		  0000G  CF	       03  FB 00031 	    CALLS   #3, FIND						      ;

		         50 	0000G  CF  D0 00036 2$:     MOVL    PRIMARY_FCB, R0					      ; 0525

				       12  13 0003B 	    BEQL    4$							      ;

		    04   A2	  20   A0  B1 0003D 	    CMPW    32(R0), 4(FIB)					      ; 0528

				       07  12 00042 	    BNEQ    3$							      ;

		    06   A2	  22   A0  B1 00044 	    CMPW    34(R0), 6(FIB)					      ; 0529

				       04  13 00049 	    BEQL    4$							      ;

				0000G  CF  D4 0004B 3$:     CLRL    CURRENT_WINDOW					      ; 0530

				  04   A2  9F 0004F 4$:     PUSHAB  4(FIB)						      ; 0533

		  0000G  CF	       01  FB 00052 	    CALLS   #1, SEARCH_FCB					      ;

		  0000G  CF	       50  D0 00057 	    MOVL    R0, PRIMARY_FCB					      ;

		         50 	0000G  CF  D0 0005C 	    MOVL    IO_PACKET, R0					      ; 0538

		         07 	  21   A0  E9 00061 	    BLBC    33(R0), 5$						      ;

				       52  DD 00065 	    PUSHL   FIB							      ; 0539

		  0000V  CF	       01  FB 00067 	    CALLS   #1, MARK_DELETE					      ;

		         50 	       01  D0 0006C 5$:     MOVL    #1, R0						      ; 0541

					   04 0006F 	    RET     							      ;

				       50  D4 00070 6$:     CLRL    R0							      ; 0450

					   04 00072 	    RET     							      ;



; Routine Size:  115 bytes







; Bliss-32 10.1-416	Monday 21-AUG-1978 23:12:12	DBB3:[F11B.SRC]DELETE.B32;9					Page 3

;

;	0544	GLOBAL ROUTINE MARK_DELETE (FIB) : NOVALUE =

;	0545	

;	0546	!++

;	0547	!

;	0548	! FUNCTIONAL DESCRIPTION:

;	0549	!

;	0550	!	This routine marks the indicated file for delete and deletes it

;	0551	!	if it is not accessed.

;	0552	!

;	0553	! CALLING SEQUENCE:

;	0554	!	MARK_DELETE (ARG1)

;	0555	!

;	0556	! INPUT PARAMETERS:

;	0557	!	ARG1: address of FIB

;	0558	!

;	0559	! IMPLICIT INPUTS:

;	0560	!	NONE

;	0561	!

;	0562	! OUTPUT PARAMETERS:

;	0563	!	NONE

;	0564	!

;	0565	! IMPLICIT OUTPUTS:

;	0566	!	NONE

;	0567	!

;	0568	! ROUTINE VALUE:

;	0569	!	NONE

;	0570	!

;	0571	! SIDE EFFECTS:

;	0572	!	file marked for delete or deleted

;	0573	!

;	0574	!--

;	0575	

;	0576	BEGIN

;	0577	

;	0578	MAP

;	0579		FIB		: REF BBLOCK;	! FIB

;	0580	

;	0581	LOCAL

;	0582		FCB		: REF BBLOCK,	! FCB of file

;	0583		HEADER		: REF BBLOCK;	! file header

;	0584	

;	0585	OWN

;	0586		DELETELOGENB	: INITIAL (0);	! delete logger enable

;	0587	

;	0588	EXTERNAL

;	0589		CLEANUP_FLAGS	: BITVECTOR,	! cleanup action flags

;	0590		CURRENT_WINDOW	: REF BBLOCK,	! window of currently open file

;	0591		CURRENT_VCB	: REF BBLOCK;	! VCB of current volume

;	0592	

;	0593	EXTERNAL ROUTINE

;	0594		LOG_DELETE,			! send to delete logger

;	0595		SEARCH_FCB,			! search FCB list

;	0596		READ_HEADER,			! read file header

;	0597		CHECK_PROTECT,			! check file protection

;	0598		MARK_DIRTY,			! mark buffer for write-back



; Bliss-32 10.1-416	Monday 21-AUG-1978 23:12:12	DBB3:[F11B.SRC]DELETE.B32;9					Page 3-1

;

;	0599		DELETE_FILE,			! delete the file

;	0600		CHECKSUM;			! checksum file header

;	0601	

;	0602	

;	0603	! Check that the file is not a reserved file (FID less than

;	0604	! .CURRENT_VCB[VCB$B_RESFILES]).

;	0605	!

;	0606	

;	0607	IF .FIB[FIB$W_FID_NUM] LEQU .CURRENT_VCB[VCB$B_RESFILES]

;	0608	AND (

;	0609	    IF .CURRENT_VCB[VCB$V_EXTFID]

;	0610	    THEN .FIB[FIB$B_FID_NMX] EQL 0

;	0611	    ELSE 1

;	0612	    )

;	0613	THEN ERR_EXIT (SS$_NOPRIV);

;	0614	

;	0615	! Find the FCB, if any, and then read the header. Check file protection.

;	0616	! Check if the file is write accessed by someone else and not the deleter.

;	0617	!

;	0618	

;	0619	FCB = SEARCH_FCB (FIB[FIB$W_FID]);

;	0620	HEADER = READ_HEADER (FIB[FIB$W_FID], .FCB);

;	0621	

;	0622	IF .DELETELOGENB THEN LOG_DELETE (.FIB, .HEADER);

;	0623	

;	0624	CHECK_PROTECT (DELETE_ACCESS, .HEADER, .FCB);

;	0625	IF (

;	0626	    IF .FCB EQL 0

;	0627	    THEN 0

;	0628	    ELSE .FCB[FCB$W_WCNT] NEQ 0)

;	0629	AND (

;	0630	    IF .CURRENT_WINDOW EQL 0

;	0631	    THEN 1

;	0632	    ELSE NOT .CURRENT_WINDOW[WCB$V_WRITE])

;	0633	THEN ERR_EXIT (SS$_ACCONFLICT);

;	0634	

;	0635	CLEANUP_FLAGS[CLF_REENTER] = 0;		! from now on deletion proceeds

;	0636	

;	0637	

;	0638	! Mark the file for delete. If the file is not accessed, then proceed to

;	0639	! actually delete it.

;	0640	!

;	0641	

;	0642	HEADER[FH2$V_MARKDEL] = 1;

;	0643	MARK_DIRTY (.HEADER);

;	0644	

;	0645	IF KERNEL_CALL (MARKDEL_FCB, .FCB)

;	0646	THEN DELETE_FILE (.FIB, .HEADER)

;	0647	ELSE CHECKSUM (.HEADER);

;	0648	

;	0649	END;					! end of routine MARK_DELETE







							    .PSECT  $LOCKEDD1$,NOEXE,2



; Bliss-32 10.1-416	Monday 21-AUG-1978 23:12:12	DBB3:[F11B.SRC]DELETE.B32;9					Page 3-2

;



				    00000000  00000 DELETELOGENB:

							    .LONG   0							      ;



							    .EXTRN  LOG_DELETE, READ_HEADER, CHECK_PROTECT, MARK_DIRTY

							    .EXTRN  DELETE_FILE, CHECKSUM, SYS$CMKRNL



							    .PSECT  $CODE$,NOWRT,2



					 000C 00073 	    .ENTRY  MARK_DELETE, Save R2,R3				      ; 0544

		         51 	  04   AC  D0 00075 	    MOVL    FIB, R1						      ; 0607

		         50 	0000G  CF  D0 00079 	    MOVL    CURRENT_VCB, R0					      ;

		         52 	  4F   A0  9A 0007E 	    MOVZBL  79(R0), R2						      ;

		    04   A1	       52  B1 00082 	    CMPW    R2, 4(R1)						      ;

				       0D  1F 00086 	    BLSSU   2$							      ;

	   05 	    0B   A0	       05  E1 00088 	    BBC     #5, 11(R0), 1$					      ; 0609

				  09   A1  95 0008D 	    TSTB    9(R1)						      ; 0610

				       03  12 00090 	    BNEQ    2$							      ;

				       24  BF 00092 1$:     CHMU    #36							      ; 0613

					   04 00094 	    RET     							      ;

	   52 	    04   AC	       04  C1 00095 2$:     ADDL3   #4, FIB, R2						      ; 0619

				       52  DD 0009A 	    PUSHL   R2							      ;

		  0000G  CF	       01  FB 0009C 	    CALLS   #1, SEARCH_FCB					      ;

		         53 	       50  D0 000A1 	    MOVL    R0, FCB						      ;

				       0C  BB 000A4 	    PUSHR   #^M<R2,R3>						      ; 0620

		  0000G  CF	       02  FB 000A6 	    CALLS   #2, READ_HEADER					      ;

		         52 	       50  D0 000AB 	    MOVL    R0, HEADER						      ;

		         0A 	0000'  CF  E9 000AE 	    BLBC    DELETELOGENB, 3$					      ; 0622

				       52  DD 000B3 	    PUSHL   HEADER						      ;

				  04   AC  DD 000B5 	    PUSHL   FIB							      ;

		  0000G  CF	       02  FB 000B8 	    CALLS   #2, LOG_DELETE					      ;

				       0C  BB 000BD 3$:     PUSHR   #^M<R2,R3>						      ; 0624

				       02  DD 000BF 	    PUSHL   #2							      ;

		  0000G  CF	       03  FB 000C1 	    CALLS   #3, CHECK_PROTECT					      ;

				       53  D5 000C6 	    TSTL    FCB							      ; 0626

				       16  13 000C8 	    BEQL    5$							      ;

				  1C   A3  B5 000CA 	    TSTW    28(FCB)						      ; 0628

				       11  13 000CD 	    BEQL    5$							      ;

		         50 	0000G  CF  D0 000CF 	    MOVL    CURRENT_WINDOW, R0					      ; 0630

				       05  13 000D4 	    BEQL    4$							      ;

	   05 	    0B   A0	       01  E0 000D6 	    BBS     #1, 11(R0), 5$					      ; 0632

				0800   8F  BF 000DB 4$:     CHMU    #2048						      ; 0633

					   04 000DF 	    RET     							      ;

		  0000G  CF	  80   8F  8A 000E0 5$:     BICB2   #128, CLEANUP_FLAGS+2				      ; 0635

		    35   A2	  80   8F  88 000E6 	    BISB2   #128, 53(HEADER)					      ; 0642

				       52  DD 000EB 	    PUSHL   HEADER						      ; 0643

		  0000G  CF	       01  FB 000ED 	    CALLS   #1, MARK_DIRTY					      ;

				       53  DD 000F2 	    PUSHL   FCB							      ; 0645

				       01  DD 000F4 	    PUSHL   #1							      ;

				       5E  DD 000F6 	    PUSHL   SP							      ;

				0000V  CF  9F 000F8 	    PUSHAB  MARKDEL_FCB						      ;

	      00000000G  9F	       04  FB 000FC 	    CALLS   #4, @#SYS$CMKRNL					      ;

		         0B 	       50  E9 00103 	    BLBC    R0, 6$						      ;

				       52  DD 00106 	    PUSHL   HEADER						      ; 0646

				  04   AC  DD 00108 	    PUSHL   FIB							      ;



; Bliss-32 10.1-416	Monday 21-AUG-1978 23:12:12	DBB3:[F11B.SRC]DELETE.B32;9					Page 3-3

;

		  0000G  CF	       02  FB 0010B 	    CALLS   #2, DELETE_FILE					      ;

					   04 00110 	    RET     							      ; 0645

				       52  DD 00111 6$:     PUSHL   HEADER						      ; 0647

		  0000G  CF	       01  FB 00113 	    CALLS   #1, CHECKSUM					      ;

					   04 00118 	    RET     							      ; 0544



; Routine Size:  166 bytes







; Bliss-32 10.1-416	Monday 21-AUG-1978 23:12:12	DBB3:[F11B.SRC]DELETE.B32;9					Page 4

;

;	0650	GLOBAL ROUTINE MARKDEL_FCB (FCB) =

;	0651	

;	0652	!++

;	0653	!

;	0654	! FUNCTIONAL DESCRIPTION:

;	0655	!

;	0656	!	This routine marks the FCB for the current file, if any, for delete.

;	0657	!	This routine must be executed in kernel mode.

;	0658	!

;	0659	! CALLING SEQUENCE:

;	0660	!	MARKDEL_FCB (ARG1)

;	0661	!

;	0662	! INPUT PARAMETERS:

;	0663	!	ARG1: address of FCB

;	0664	!

;	0665	! IMPLICIT INPUTS:

;	0666	!	PRIMARY_FCB: FCB of file if any

;	0667	!	DIR_FCB: FCB of directory file if any

;	0668	!	CURRENT_VCB: VCB of volume

;	0669	!

;	0670	! OUTPUT PARAMETERS:

;	0671	!	NONE

;	0672	!

;	0673	! IMPLICIT OUTPUTS:

;	0674	!	NONE

;	0675	!

;	0676	! ROUTINE VALUE:

;	0677	!	1 if FCB removed (i.e., if file is deletable)

;	0678	!	0 if delete is to be deferred

;	0679	!

;	0680	! SIDE EFFECTS:

;	0681	!	FCB marked for delete, may be deallocated

;	0682	!

;	0683	!--

;	0684	

;	0685	BEGIN

;	0686	

;	0687	MAP

;	0688		FCB		: REF BBLOCK;	! FCB arg

;	0689	

;	0690	LOCAL

;	0691		DUMMY;				! dummy destination for REMQUE

;	0692	

;	0693	EXTERNAL

;	0694		CURRENT_VCB	: REF BBLOCK,	! VCB of volume

;	0695		PRIMARY_FCB	: REF BBLOCK,	! FCB of current file

;	0696		DIR_FCB		: REF BBLOCK;	! FCB of directory file

;	0697	

;	0698	EXTERNAL ROUTINE

;	0699		DEL_EXTFCB,			! delete extension FCB's

;	0700		DEALLOCATE;			! deallocate dynamic memory

;	0701	

;	0702	

;	0703	! If the FCB exists, we mark it for delete (causing the file to be deleted

;	0704	! when the access count goes to 0). Make sure that the directory LRU bit



; Bliss-32 10.1-416	Monday 21-AUG-1978 23:12:12	DBB3:[F11B.SRC]DELETE.B32;9					Page 4-1

;

;	0705	! in the FCB is off (crediting 1 to the LRU count if it was on). If the

;	0706	! access count is zero, dump the FCB and its extensions.

;	0707	!

;	0708	

;	0709	IF .FCB NEQ 0

;	0710	THEN

;	0711	    BEGIN

;	0712	    FCB[FCB$V_MARKDEL] = 1;

;	0713	    IF TESTBITSC (FCB[FCB$V_DIR])

;	0714	    THEN CURRENT_VCB[VCB$B_LRU_LIM] = .CURRENT_VCB[VCB$B_LRU_LIM] + 1;

;	0715	    IF .FCB[FCB$W_ACNT] NEQ 0 THEN RETURN 0; ! file is accessed

;	0716	    REMQUE (.FCB, DUMMY);

;	0717	    DEL_EXTFCB (.FCB);

;	0718	    DEALLOCATE (.FCB);

;	0719	    IF .PRIMARY_FCB EQL .FCB THEN PRIMARY_FCB = 0;

;	0720	    IF .DIR_FCB EQL .FCB THEN DIR_FCB = 0;

;	0721	    END;

;	0722	

;	0723	RETURN 1;				! ok to delete file

;	0724	

;	0725	END;					! end of routine MARKDEL_FCB







							    .EXTRN  DIR_FCB, DEL_EXTFCB, DEALLOCATE



					 0000 00119 	    .ENTRY  MARKDEL_FCB, Save nothing				      ; 0650

		         51 	  04   AC  D0 0011B 	    MOVL    FCB, R1						      ; 0709

				       41  13 0011F 	    BEQL    3$							      ;

		    1E   A1	       02  88 00121 	    BISB2   #2, 30(R1)						      ; 0712

	   08 	    1E   A1	       00  E5 00125 	    BBCC    #0, 30(R1), 1$					      ; 0713

		         50 	0000G  CF  D0 0012A 	    MOVL    CURRENT_VCB, R0					      ; 0714

				  49   A0  96 0012F 	    INCB    73(R0)						      ;

				  18   A1  B5 00132 1$:     TSTW    24(R1)						      ; 0715

				       2F  12 00135 	    BNEQ    4$							      ;

		         50 	       61  0F 00137 	    REMQUE  (R1), DUMMY						      ; 0716

				  04   AC  DD 0013A 	    PUSHL   FCB							      ; 0717

		  0000G  CF	       01  FB 0013D 	    CALLS   #1, DEL_EXTFCB					      ;

				  04   AC  DD 00142 	    PUSHL   FCB							      ; 0718

		  0000G  CF	       01  FB 00145 	    CALLS   #1, DEALLOCATE					      ;

		    04   AC	0000G  CF  D1 0014A 	    CMPL    PRIMARY_FCB, FCB					      ; 0719

				       04  12 00150 	    BNEQ    2$							      ;

				0000G  CF  D4 00152 	    CLRL    PRIMARY_FCB						      ;

		    04   AC	0000G  CF  D1 00156 2$:     CMPL    DIR_FCB, FCB					      ; 0720

				       04  12 0015C 	    BNEQ    3$							      ;

				0000G  CF  D4 0015E 	    CLRL    DIR_FCB						      ;

		         50 	       01  D0 00162 3$:     MOVL    #1, R0						      ; 0723

					   04 00165 	    RET     							      ;

				       50  D4 00166 4$:     CLRL    R0							      ; 0650

					   04 00168 	    RET     							      ;



; Routine Size:  80 bytes





;	0726	



; Bliss-32 10.1-416	Monday 21-AUG-1978 23:12:12	DBB3:[F11B.SRC]DELETE.B32;9					Page 4-2

;

;	0727	END

;	0728	ELUDOM













;				       PSECT SUMMARY

;

;	Name		 Bytes			       Attributes

;

;  $CODE$         	   361  NOWRT,  RD ,  EXE,NOSHR,  LCL,  REL,  CON,NOPIC,ALIGN(2)

;  $LOCKEDD1$     	     4    WRT,  RD ,NOEXE,NOSHR,  LCL,  REL,  CON,NOPIC,ALIGN(2)









;				LIBRARY STATISTICS

;

;					     -------- Symbols --------    Blocks

;	File				     Total    Loaded   Percent      Read

;

;  DBA4:[SYSLIB]LIB.L32;1		      5582        31         0       247











; Size:		361 code + 4 data bytes

; Run Time:	00:09.2

; Elapsed Time:	00:17.3

; Memory Used:	284 pages

; Compilation Complete

