*DECK MDRPTR
USETEXT NIPDEF
USETEXT DRHDR
USETEXT FREETAB
PROC MDRPTR(RINGFP,RINGBP,PTR);
STARTIMS;
#
*1DC MDRPTR
*
* 1. PROC NAME AUTHOR DATE
* MDRPTR C. BITTNER 82/07/01
*
* 2. FUNCTIONAL DESCRIPTION
* UPDATE DATA RING POINTERS
*
* 3. METHOD USED
* UPDATE BACK POINTER OF NEXT ENTRY AND FORWARD
* POINTER OF PREVIOUS ENTRY (IF MOVED)
* BY CALLING MCHKPTR.
*
* 4. ENTRY PARAMETERS
* RINGFP - FORWARD RING POINTER
* RINGBP - BACKWARD RING POINTER
* PTR - CURRENT BUFFER LOCATION
*
* 5. EXIT PARAMETERS
* NONE
*
* 6. COMDECKS CALLED AND SYMPL TEXTS USED
* NIPDEF DRHDR FREETAB OSIZE
*
* 7. ROUTINES AND OVERLAYS CALLED
* MCHKPTR - UPDATE PTR IF MOVED
* XTRACE - TRACE PROCEDURE CALL
*
* 8. DAYFILE MESSAGES AND OTHER IMPORTANT INFORMATION
* THIS PROCEDURE IS CALLED BY MAJPTR.
* W A R N I N G - THE TOTAL SIZE OF ALL GARBAGE COLLECTION
* ROUTINES (MAJPTR,MCHKPTR,MGBGCLT AND
* MDRPTR) CANNOT EXCEED THE PRIMARY
* AND SECONDARY
*CALL OSIZE
#
STOPIMS;
#
INPUT PARAMETERS
#
ITEM RINGFP; # RING FORWARD POINTER #
ITEM RINGBP; # RING BACK POINTER #
ITEM PTR; # NEW POINTER OF RING ENTRY #
#
EXTERNAL REFERENCES
#
XREF
BEGIN
PROC MCHKPTR; # UPDATE PTR IF MOVED #
PROC XTRACE; # TRACE PROCEDURE CALL #
END
BEGIN
CONTROL IFEQ DEBUG,1;
XTRACE("MDRPT");
CONTROL FI;
P<DRHDRWD> = 0;
MCHG = RINGFP; # NEXT RING ENTRY #
IF MCHG NQ 0
THEN
BEGIN
MCHKPTR; # UPDATE POINTER IF MOVED #
BACKPTR[MCHG] = PTR; # UPDATE BACK POINTER OF NEXT ENTRY #
MCHG = RINGBP; # PREVIOUS RING ENTRY #
MCHKPTR; # CHECK WHETHER PREVIOUS RING ENTRY MOVED #
NEXTPTR[MCHG] = PTR; # UPDATE NEXT PTR OF PREV. ENTRY #
END
RETURN;
END
TERM