46 |
|
? (col)[0] > (col)[2] ? (col)[0] : (col)[2] \ |
47 |
|
: (col)[1] > (col)[2] ? (col)[1] : (col)[2] ) |
48 |
|
|
49 |
+ |
#define colrval(c,p) ( (c)[EXP] ? \ |
50 |
+ |
ldexp((c)[p]+.5,(int)(c)[EXP]-(COLXS+8)) : \ |
51 |
+ |
0. ) |
52 |
+ |
|
53 |
+ |
#define normbright(c) (int)((77L*(c)[RED]+151L*(c)[GRN]+28L*(c)[BLU])/256) |
54 |
+ |
|
55 |
|
#define WHTCOLOR {1.0,1.0,1.0} |
56 |
|
#define BLKCOLOR {0.0,0.0,0.0} |
57 |
|
#define WHTCOLR {128,128,128,COLXS+1} |
58 |
|
#define BLKCOLR {0,0,0,0} |
59 |
+ |
|
60 |
+ |
/* definitions for resolution header */ |
61 |
+ |
#define XDECR 1 |
62 |
+ |
#define YDECR 2 |
63 |
+ |
#define YMAJOR 4 |
64 |
+ |
|
65 |
+ |
/* macros for exposures */ |
66 |
+ |
#define EXPOSSTR "EXPOSURE=" |
67 |
+ |
#define EXPOSSTRL 9 |
68 |
+ |
#define isexpos(hl) (!strncmp(hl,EXPOSSTR,EXPOSSTRL)) |
69 |
+ |
#define exposval(hl) atof((hl)+EXPOSSTRL) |
70 |
+ |
#define fputexpos(ex,fp) fprintf(fp,"%s%e\n",EXPOSSTR,ex) |
71 |
+ |
|
72 |
+ |
/* macros for pixel aspect ratios */ |
73 |
+ |
#define ASPECTSTR "PIXASPECT=" |
74 |
+ |
#define ASPECTSTRL 10 |
75 |
+ |
#define isaspect(hl) (!strncmp(hl,ASPECTSTR,ASPECTSTRL)) |
76 |
+ |
#define aspectval(hl) atof((hl)+ASPECTSTRL) |
77 |
+ |
#define fputaspect(pa,fp) fprintf(fp,"%s%f\n",ASPECTSTR,pa) |
78 |
+ |
|
79 |
+ |
extern double ldexp(), atof(); |