| 10 | 
  | 
 | 
| 11 | 
  | 
#include "color.h" | 
| 12 | 
  | 
 | 
| 13 | 
< | 
#define MAXGSHIFT       4               /* maximum shift for gamma table */ | 
| 13 | 
> | 
#define MAXGSHIFT       15              /* maximum shift for gamma table */ | 
| 14 | 
  | 
 | 
| 15 | 
  | 
static BYTE     g_mant[256], g_nexp[256]; | 
| 16 | 
  | 
 | 
| 128 | 
  | 
register int    len; | 
| 129 | 
  | 
register int    adjust; | 
| 130 | 
  | 
{ | 
| 131 | 
+ | 
        int     minexp; | 
| 132 | 
+ | 
 | 
| 133 | 
+ | 
        if (adjust == 0) | 
| 134 | 
+ | 
                return; | 
| 135 | 
+ | 
        minexp = adjust < 0 ? -adjust : 0; | 
| 136 | 
  | 
        while (len-- > 0) { | 
| 137 | 
< | 
                scan[0][EXP] += adjust; | 
| 137 | 
> | 
                if (scan[0][EXP] <= minexp) | 
| 138 | 
> | 
                        scan[0][RED] = scan[0][GRN] = scan[0][BLU] = | 
| 139 | 
> | 
                        scan[0][EXP] = 0; | 
| 140 | 
> | 
                else | 
| 141 | 
> | 
                        scan[0][EXP] += adjust; | 
| 142 | 
  | 
                scan++; | 
| 143 | 
  | 
        } | 
| 144 | 
  | 
} |