      program readpnts
      character*4 id(2),ifile*56
      dimension post(24)
c
      call askin
      ifile=' '
200   call askc('Enter input xyz or post file name',ifile,ierr)
      if(ierr.lt.-1) stop
      if(ierr.lt.0.and.ifile.eq.' ') stop
      call xopen(10,ifile,'old','read',itype,ierr)
      if(ierr.ne.0) go to 200
      nr=0
      if(itype.eq.0) then
c
c     xyz file
c
      print*,'       X                Y                Z'
   10 call xioxyz('r',10,post,3,ierr)
      if(ierr.ne.0) go to 999
      write(6,*) post(1),post(2),post(3)
      nr=nr+1
      if(nr.lt.22)  go to 10
      ians=1
      call aski4l('More?',ians,ierr)
      if(ierr.eq.-2) then
        close(10)
        go to 200
      endif
      if (ians.eq.0) go to 999
      nr=0
      go to 10
c
      else if(itype.gt.0) then
c
c     post file
c
110   print*,' ID1 ID2     X/LON     Y/LAT      1',
     &'       2        3       4       5        6'
   30 call xiopst('r',10,id,post,itype,ierr)
      if(ierr.ne.0) go to 999
      write(6,130) id,(post(i),i=1,itype)
130   format(1x,2a4,2f10.4,2f8.1,3f8.1,f11.3)
      nr=nr+1
      if(nr.lt.22)  go to 30
      ians=1
      call aski4l('More?',ians,ierr)
      if(ierr.eq.-2) then
        close(10)
        go to 200
      endif
      if (ians.eq.0) go to 999
      nr=0
      go to 30
c
c      else
c
c  ascii file
c
      endif
999   close(10)
      stop
      end
c******************************************
c      subroutine ask(ques)
c      character*(*) ques
c      character*40 string
c      string=ques
cc       this pads ques to left with blanks...
c      write(6,101) string
c 101  format(5x,a40,$)
c      return
c      end
