c c This routine takes HYPTST.TXT as input and produce HYPTST.OUT c The result is every word hyphenated to allow checking for really c bad hyphenations. Input lines must be 80 chars or less. c c IOP = -1 use DIGRAM only 0 both 1 SUFFIX only c LO,HI = min # chars before first, after last hyphen c size = min word size c BYTE IA(82),IB(132) WRITE(5,1002) READ(5,1003) IOP,ILO,IHI,ISZ ! Ask user for options 1002 format('$Enter iop,lo,hi,size:') 1003 format(5I10) ISZ = -ISZ CALL assign(6,'SYS$DISK:HYPTST.OUT') ! Set up output file CALL assign(1,'HYPTST.TXT') ! Set up input file 1 READ(1,1000,ERR=900,END=900)(IA(j),j=2,81) ! Get 1 line of input DO 2 j=2,81 ! Find first non space MIN = j IF(IA(J) .ne. ' ') go to 3 2 continue 3 DO 4 j=81,2,-1 ! Find last non space MAX = j IF(IA(J) .ne. ' ') go to 6 4 continue 6 IF(MIN .ge. MAX) go to 1 ! Blank line ? Do 30 J=min,max ! Put all into lowercase IF(IA(J) .ge. 'A' .and. IA(J) .le. 'Z') 1 IA(J) = IA(J) + "40 30 continue CALL HYPTST(IA(2),ILO,IHI,IOP,ISZ) ! Get hyphenations I = 0 DO 10 J=MIN,MAX ! Now insert hyphens K=IA(J) IF(IAND("200,K) .eq. 0) go to 5 ! No hyphen in front ? I = I + 1 IB(I)='-' ! insert hyphen 5 I = I + 1 IB(I)=ia(J) ! and character IF(I .gt. 130) go to 20 ! Buffer not overflowed ? 10 continue 20 WRITE(6,1001) (IB(J),J=1,I) ! output text with hyphens 1000 FORMAT(80A1) 1001 FORMAT(1x,80A1) GO TO 1 900 CALL EXIT end