ncl/ncl-boz.patch

30 lines
1.3 KiB
Diff

diff -up ncl-6.6.2/ncarg2d/src/libncarg_gks/bwi/argb2ci.f.boz ncl-6.6.2/ncarg2d/src/libncarg_gks/bwi/argb2ci.f
--- ncl-6.6.2/ncarg2d/src/libncarg_gks/bwi/argb2ci.f.boz 2019-02-27 16:44:39.000000000 -0700
+++ ncl-6.6.2/ncarg2d/src/libncarg_gks/bwi/argb2ci.f 2020-03-17 20:04:26.863407782 -0600
@@ -16,10 +16,10 @@ C
integer index, nearest
integer i
integer ARGBMASK, RMASK, GMASK, BMASK
- parameter (ARGBMASK = Z'40000000')
- parameter (RMASK = Z'00FF0000')
- parameter (GMASK = Z'0000FF00')
- parameter (BMASK = Z'000000FF')
+ parameter (ARGBMASK = INT(Z'40000000'))
+ parameter (RMASK = INT(Z'00FF0000'))
+ parameter (GMASK = INT(Z'0000FF00'))
+ parameter (BMASK = INT(Z'000000FF'))
real r, g, b, dist, mindist
if (iand(index, ARGBMASK).eq.0) then
@@ -31,8 +31,8 @@ C find the closest match, based upon
mindist = 2e31
nearest = 0
do i=1,mol
- r = (iand(index, RMASK) / Z'0000FFFF') / 255.
- g = (iand(index, GMASK) / Z'000000FF') / 255.
+ r = (iand(index, RMASK) / INT(Z'0000FFFF')) / 255.
+ g = (iand(index, GMASK) / INT(Z'000000FF')) / 255.
b = (iand(index, BMASK)) / 255.
C we don't need absolute distance, so forego the sqrt operation...