NCEPLIBS-bufr  12.0.1
drstpl.f
Go to the documentation of this file.
1 C> @file
2 C> @brief Search for a specified mnemonic within unexpanded sequences
3 C> of the internal jump/link table.
4 C> @author Woollen @date 1994-01-06
5 
6 C> This subroutine is called by subroutine
7 C> ufbrw() whenever it can't find a mnemonic it wants to write within the
8 C> current subset buffer. It looks for the mnemonic within any
9 C> unexpanded "drs" (stack) or "drb" (1-bit delayed replication)
10 C> sequences inside of the portion of the subset buffer bounded by the
11 C> indices inv1 and inv2. If found, it expands the applicable "drs" or
12 C> "drb" sequence to the point where the mnemonic in question now
13 C> appears in the subset buffer, and in doing so it will also return
14 C> a new value for inv2.
15 C>
16 C> @param[in] INOD - integer: jump/link table index of mnemonic to look for.
17 C> @param[in] LUN - integer: I/O stream index into internal memory arrays.
18 C> @param[in] INV1 - integer: starting index of the portion of the subset
19 C> buffer currently being processed by ufbrw().
20 C> @param[inout] INV2 - integer:
21 C> - on input, ending index of the portion of the subset buffer currently
22 C> being processed by ufbrw().
23 C> - on output, if invn = 0 then inv2 is unchanged from its input value.
24 C> Otherwise, it contains the redefined ending index of the portion of the subset
25 C> buffer currently being processed by ufbrw(), since expanding a delayed
26 C> replication sequence will have necessarily increased the size of this buffer.
27 C> @param[out] INVN - integer: location index of inod within subset buffer.
28 C> - 0 not found.
29 C>
30 C> @author Woollen @date 1994-01-06
31  SUBROUTINE drstpl(INOD,LUN,INV1,INV2,INVN)
32 
33  USE moda_tables
34 
35 C-----------------------------------------------------------------------
36 C-----------------------------------------------------------------------
37 
38 1 node = inod
39 2 node = jmpb(node)
40  IF(node.EQ.0) GOTO 100
41  IF(typ(node).EQ.'DRS' .OR. typ(node).EQ.'DRB') THEN
42  invn = invwin(node,lun,inv1,inv2)
43  IF(invn.GT.0) THEN
44  CALL usrtpl(lun,invn,1)
45  CALL newwin(lun,inv1,inv2)
46  invn = invwin(inod,lun,invn,inv2)
47  IF(invn.GT.0) GOTO 100
48  GOTO 1
49  ENDIF
50  ENDIF
51  GOTO 2
52 
53 C EXIT
54 C ----
55 
56 100 RETURN
57  END
subroutine drstpl(INOD, LUN, INV1, INV2, INVN)
This subroutine is called by subroutine ufbrw() whenever it can't find a mnemonic it wants to write w...
Definition: drstpl.f:32
function invwin(NODE, LUN, INV1, INV2)
This function looks for a specified node within the portion of the current subset buffer bounded by t...
Definition: invwin.f:22
This module contains array and variable declarations used to store the internal jump/link table.
character *3, dimension(:), allocatable typ
Type indicators corresponding to tag:
integer, dimension(:), allocatable jmpb
Jump backward indices corresponding to tag and typ:
subroutine newwin(LUN, IWIN, JWIN)
Given an index within the internal jump/link table which points to the start of an "rpc" window (whic...
Definition: newwin.f:22
subroutine usrtpl(LUN, INVN, NBMP)
Store the subset template into internal arrays.
Definition: usrtpl.f:22