1      SUBROUTINE ASREAD(NSEG,IPF,ITYP)
2      INCLUDE 'Parametres.f'
3C
4      NSEG = 0
5      if (ipostscript.eq.1) then
69999    continue
7        call getxycx11(iev,ixposcurs,iyposcurs
8     &       ,ixposcurs_root,iyposcurs_root)
9        if (iev.eq.-2) then
10          NSEG = -1
11          RETURN
12        endif
13C
148888    if (iev.ge.33.and.iev.le.57) then
15          IPF = iev-48
16        elseif(iev.ge.65.and.iev.le.90) then
17          IPF = iev-55
18        elseif(iev.ge.91.and.iev.le.96) then
19          IPF = iev-112
20        elseif(iev.ge.97.and.iev.le.126) then
21          IPF = iev-87
22c
23c click
24c
25        elseif(iev.ge.251.and.iev.le.255) then
26          iev = ichar(mouse(iev-250)(1:1))
27          goto 8888
28c
29c doubleclick
30c
31        elseif(iev.ge.261.and.iev.le.265) then
32          nseg = 1
33          iev = ichar(mouse(iev-260)(1:1))
34          goto 8888
35c fleches
36        elseif(iev.ge.1098.and.iev.le.1104.and.mod(iev,2).eq.0) then
37          ipf = iev/2
38        else
39cc            print*,'asread',iev
40          GOTO 9999
41        endif
42      else
43        call findups(ipf)
44      endif
45      end
46c-----------------------------------------------------------------------
47      subroutine findups(ipf)
48      INCLUDE 'Parametres.f'
49c
50      write(ilaser_file,'(a)')
51     &'% If you are in trouble with this file, e.g. pictures printing'
52      write(ilaser_file,'(a)')
53     &'% on different pages after assembly in a software like xfig,'
54      write(ilaser_file,'(a)')
55     &'% try to comment out the next line (showdessin)'
56      write(ilaser_file,'(a)')
57     &  'showdessin {gsave copypage grestore} if'
58      write(ilaser_file,'(a)') '%%Trailer'
59      write(ilaser_file,'(a)') '%%Pages: 1'
60      write(ilaser_file,'(a)') 'grestore'
61      write(ilaser_file,'(a)') '%%EOF'
62c
63c a virer d'apres Christophe B
64c
65cc      write(ilaser_file,'(a)') '%%EndDocument'
66      write(ilaser_file,'(a)') 'end'
67      if (ilaser_file.ne.6) then
68        if (ipostscript.eq.-1) then
69          if (albion) then
70            print*,'Black and white PostScript file generated OK: '
71     &           //nomfichpost(1:lonfichpost)
72          else
73            print*,'Fichier PostScript noir et blanc g�n�r� OK : '
74     &           //nomfichpost(1:lonfichpost)
75          endif
76        else
77          if (albion) then
78            print*,'Color PostScript file generated OK: '
79     &           //nomfichpost(1:lonfichpost)
80          else
81            print*,'Fichier PostScript couleur g�n�r� OK : '
82     &           //nomfichpost(1:lonfichpost)
83          endif
84        endif
85      endif
86      close(ilaser_file)
87      ipostscript=1
88      ipf=9999
89      facteur_en_x = facteur_en_x_sauve
90      facteur_en_y = facteur_en_y_sauve
91      origine_x = origine_x_sauve
92      origine_y = origine_y_sauve
93      end
94