aboutsummaryrefslogtreecommitdiff
path: root/sys/gio/nspp/portlib/trans.f
blob: 5fe0affc2d0d59515dd74a9baf95eaea7cf22604 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
subroutine trans
      common /sysplt/ mmajx  ,mmajy  ,mminx  ,mminy  ,mxlab  ,mylab  ,
     1                mflg   ,mtype  ,mxa    ,mya    ,mxb    ,myb    ,
     2                mx     ,my     ,mtypex ,mtypey ,xxa    ,yya    ,
     3                xxb    ,yyb    ,xxc    ,yyc    ,xxd    ,yyd    ,
     4                xfactr ,yfactr ,xadd   ,yadd   ,xx     ,yy     ,
     5                mfmtx(3)       ,mfmty(3)       ,mumx   ,mumy   ,
     6                msizx  ,msizy  ,mxdec  ,mydec  ,mxor   ,mop(19),
     7                mname(19)      ,mxold  ,myold  ,mxmax  ,mymax  ,
     8                mxfac  ,myfac  ,modef  ,mf2er  ,mshftx ,mshfty ,
     9                mmgrx  ,mmgry  ,mmnrx  ,mmnry  ,mfrend ,mfrlst ,
     +                mcrout ,mpair1 ,mpair2 ,msblen ,mflcnt ,mjxmin ,
     1                mjymin ,mjxmax ,mjymax ,mnxsto ,mnysto ,mxxsto ,
     2                mxysto ,mprint ,msybuf(360)    ,mncpw  ,minst  ,
     3                mbufa  ,mbuflu ,mfwa(12)       ,mlwa(12)       ,
     4                mipair ,mbprs(16)      ,mbufl  ,munit  ,mbswap ,
     5                small
c     ray bovet patch to avoid small integers being set to 0
      integer xx,yy
c
      logical         intt
      equivalence     (zz,mz),(temp,itemp)
c     ray bovet patch to avoid small integers being set to 0
c     zz = xx
      mz = xx
      if (intt(zz)) go to 102
      if (mtypex .eq. 0) go to 101
      if (zz .le. 0.0)
     1    call uliber (0,35h0negative argument with log scaling,35)
      zz = amax1(zz,small)
      zz = xfactr*alog10(zz)+xadd
      go to 103
  101 zz = xfactr*zz+xadd
      go to 103
  102 zz = float(ishift(mz-1,mshftx))
  103 mx = max1(0.,amin1(32767.,zz))
c     ray bovet patch to avoid small integers being set to 0
c     zz = yy
      mz = yy
      if (intt(zz)) go to 105
      if (mtypey .eq. 0) go to 104
      if (zz .le. 0.0)
     1    call uliber (0,35h0negative argument with log scaling,35)
      zz = amax1(zz,small)
      zz = yfactr*alog10(zz)+yadd
      go to 106
  104 zz = yfactr*zz+yadd
      go to 106
  105 zz = float(ishift(mz-1,mshfty))
  106 my = max1(0.,amin1(32767.,zz))
      return
      end