| 6 |
|
*/ |
| 7 |
|
|
| 8 |
|
#include <stdio.h> |
| 9 |
+ |
|
| 10 |
+ |
#include "resolu.h" |
| 11 |
|
#include "color.h" |
| 12 |
|
#include "warp3d.h" |
| 13 |
|
|
| 20 |
|
int iclip = CGAMUT_UPPER; /* input value gamut clipping */ |
| 21 |
|
int oclip = CGAMUT_LOWER; /* output value gamut clipping */ |
| 22 |
|
|
| 23 |
+ |
static void syserror(char *s); |
| 24 |
+ |
static void picwarp(void); |
| 25 |
|
|
| 26 |
< |
main(argc, argv) |
| 27 |
< |
int argc; |
| 28 |
< |
char *argv[]; |
| 26 |
> |
|
| 27 |
> |
int |
| 28 |
> |
main( |
| 29 |
> |
int argc, |
| 30 |
> |
char *argv[] |
| 31 |
> |
) |
| 32 |
|
{ |
| 33 |
|
static char picfmt[LPICFMT+1] = PICFMT; |
| 34 |
|
int cwflags = 0; |
| 95 |
|
} |
| 96 |
|
|
| 97 |
|
|
| 98 |
< |
syserror(s) /* print system error and exit */ |
| 99 |
< |
char *s; |
| 98 |
> |
static void |
| 99 |
> |
syserror( /* print system error and exit */ |
| 100 |
> |
char *s |
| 101 |
> |
) |
| 102 |
|
{ |
| 103 |
|
fprintf(stderr, "%s: ", progname); |
| 104 |
|
perror(s); |
| 106 |
|
} |
| 107 |
|
|
| 108 |
|
|
| 109 |
< |
picwarp() /* warp our picture scanlines */ |
| 109 |
> |
static void |
| 110 |
> |
picwarp(void) /* warp our picture scanlines */ |
| 111 |
|
{ |
| 112 |
|
register COLOR *scan; |
| 113 |
|
long ngamut = 0; |
| 149 |
|
} |
| 150 |
|
} |
| 151 |
|
if (ngamut >= (long)xres*yres/100) |
| 152 |
< |
fprintf(stderr, "%s: warning - %d%% of pixels out of gamut\n", |
| 152 |
> |
fprintf(stderr, "%s: warning - %ld%% of pixels out of gamut\n", |
| 153 |
|
progname, 100*ngamut/((long)xres*yres)); |
| 154 |
|
free((void *)scan); |
| 155 |
|
} |