c c This routine takes HYPTST.IN 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 Uppercase letters are not included in hyphenation. 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,ITH,IDIF,IDIP ! Ask user for options IF(ITH .eq. 0) ITH = 224 IF(IDIF .eq. 0) IDIF= 15 IF(IDIP .eq. 0) IDIP = 512 1002 format(' IOP=-1 Digram, 0 both, 1 Suffix/prefix' 1 / '$Enter iop,lo,hi,size,THR,IDIF,IDIP:') 1003 format(10I10) ISZ = -ISZ OPEN(UNIT=1,file='hyptst.in',type='old',readonly) ! input file open(unit=2,file='hyptst.out',type='new') ! Output 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 ? CALL HYPTST(IA(2),ILO,IHI,IOP,ISZ,ITH,IDIF,IDIP)! 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)=iand(K,"177) ! and character IF(I .gt. 130) go to 20 ! Buffer not overflowed ? 10 continue 20 WRITE(2,1001) (IB(J),J=1,I) ! output text with hyphens 1000 FORMAT(80A1) 1001 FORMAT(1x,80A1) GO TO 1 900 CALL EXIT end