home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / hensa / maths / pgplot_1 / SYS_ARC / f77 / PGUnpack < prev    next >
Text File  |  1996-01-02  |  2KB  |  46 lines

  1.       PROGRAM UNPACK
  2. C----------------------------------------------------------------------
  3. C
  4. C February 1994 Output file name changed for Acorn Archimedes
  5. C               environment.
  6. C                            D.J. Crennell (Fortran Friends)
  7. C
  8. C Convert packed (binary) representation of GRFONT into unpacked
  9. C (ASCII) representation suitable for editing. The input file is
  10. C read from PLT$FONT as in PGPLOT; the output file is GRFONT.TXT.
  11. C This program uses the PGPLOT internal routines GRSY00 and
  12. C GRSYXD and must therefore be linked with the non-shareable library.
  13. C
  14. C T. J. Pearson  1987 May 6
  15. C----------------------------------------------------------------------
  16.       INTEGER        XYGRID(300)
  17.       LOGICAL        UNUSED
  18.       INTEGER        I, N, LENGTH
  19. C-----------------------------------------------------------------------
  20.       OPEN (UNIT=1, FILE='<PGPLOT_DIR>.GRFont/txt', STATUS='NEW',
  21.      1      FORM = 'FORMATTED')
  22.       CALL GRSY00
  23.       DO 30 N=1,4000
  24.           CALL GRSYXD(N,XYGRID,UNUSED)
  25.           IF (.NOT.UNUSED) THEN
  26. c             DO 10 I=1,300
  27.               DO 10 I=2,300,2
  28.                   IF(XYGRID(I).EQ.-64) THEN
  29.                       IF (XYGRID(I+1).EQ.-64) THEN
  30.                           LENGTH = I+1
  31.                           GOTO 20
  32.                       END IF
  33.                   END IF
  34.    10         CONTINUE
  35.               STOP 'Unfortunate error'
  36.    20         WRITE (1,'(7(2X,2I4))') N, LENGTH, (XYGRID(I), I=1,5)
  37.               WRITE (1,'(7(2X,2I4))') (XYGRID(I),I=6,LENGTH)
  38.               PRINT *,'entry',N
  39.           END IF
  40.    30 CONTINUE
  41.       CLOSE(1)
  42.       CALL OSCLI('SetType '//'<PGPLOT_DIR>.fonts.grfont/txt FFF')
  43. C-----------------------------------------------------------------------
  44.       END
  45.