SUBROUTINE CHGLST ( fillst, lenlst, ier ) C CHARACTER*80 fillst C INTEGER*2 lenlst, ier INTEGER*2 iend, locsea, i, j INTEGER*2 itmp C C Executable begins here. C iend = lenlst ! Save initial end ! point. IF ( lenlst .LE. 0 ) THEN ! No list. ier = -1 ! Flag it. ELSE ! There is a list. i = 1 ! Start at beginning. 25 CONTINUE ! This is a model of ! a DO WHILE loop which ! is not available in ! PDP FORTRAN-77 yet. ier = 1 ! Init. each loop with ! success. IF ( fillst(i:i) .EQ. ':' ) THEN ! Find colon. DO 75 j = i, 1, -1 ! Reverse search. IF ( fillst(j:j) .EQ. ',' ) THEN! Found comma. locsea = j + 1 ! Save location. GO TO 76 ! Exit loop. END IF ! End comma check. 75 CONTINUE ! End DO loop. locsea = 1 ! Force to start of ! string. 76 CONTINUE ! Jump with comma found. itmp = i - locsea + 1 ! fillst(locsea:iend-itmp) = ! Remove device spec. + fillst(i+1:iend) ! iend = iend - itmp ! Reset end of list. i = locsea - 1 ! Move back over comma. D TYPE *, 'DEV' D TYPE 100, fillst(1:iend), iend, locsea, i D100 FORMAT ( ' FILLST: ',A/ D + ' IEND: ',I6,' LOCSEA: ',I6,' I: ',I6 ) END IF ! End colon check. IF ( fillst(i:i) .EQ. '[' ) THEN ! UIC or directory spec. DO 85 j = i + 1, iend ! Check each character. IF ( fillst(j:j) .EQ. ']' ) THEN! Found end of spec. locsea = j + 1 ! Point after ]. GO TO 86 ! Exit loop. END IF ! End ] check. 85 CONTINUE ! End loop. locsea = 0 86 CONTINUE ! Jump here if ] found. IF ( locsea .LE. 0 ) THEN ! Invalid syntax. ier = -2 ! Flag error. i = iend + 1 ! Force exit from loop. ELSE ! Good so far... itmp = locsea - i ! fillst(i:iend-itmp) = ! Remove dir spec. + fillst(locsea:iend) ! iend = iend - itmp ! Update end location. i = locsea ! Update counter. END IF D TYPE *, 'UIC' D TYPE 100, fillst(1:iend), iend, locsea, i END IF IF ( i .LT. iend ) THEN ! Continue looping. D TYPE *, 'I = ',i i = i + 1 ! Increment char. count. GO TO 25 ! Check for next colon. END IF ! End loop exit check. END IF ! End length if test. IF ( ier .GT. 0 ) THEN ! Success. lenlst = iend ! Update end location. END IF ! 9000 CONTINUE RETURN END