anchor.diff:                    call plline(sx, sy)
                  endif
                  start = .true.
  -             
  +
                  sx(3) = xxe
                  sy(3) = yye
                  sx(2) = xxe
  
positive.code:             call plxormod(.false., st)
              call plgetcursor(gin)
              call plxormod(.true., st)
              
              if (gin%button .eq. 1) then 
                 xxi = gin%wX
                 yyi = gin%wY
                 if (start) then
  !C                clear previous rectangle
                    call plline(sx, sy)
                 endif
                 
                 start = .false.
                 
                 sx(1) = xxi
                 sy(1) = yyi
                 sx(5) = xxi
                 sy(5) = yyi
              endif
              
              if (iand(gin%state,Z'100').ne.0) then
                 xxe = gin%wX
                 yye = gin%wY
  
negative.code: !     Read the second part - we need to do it the hard way :(
  !
  !     Note:
  !     The algorithm works if the unit of record length is a byte or
  !     if it is a multiple therefore (up to 8 bytes are allowed).
  !     Background: Some compilers use a word (4 bytes) as the unit of
  !     length instead, but often provide a compile switch to use bytes,
  !     we can not rely on this though.
  !
        call bytes_in_rec( bytes )
  
        open( 10, file = fname, access = 'direct', recl = 1 )
  
        record = 0
  