1 |
– |
/* Copyright (c) 1993 Regents of the University of California */ |
2 |
– |
|
1 |
|
#ifndef lint |
2 |
< |
static char SCCSid[] = "$SunId$ LBL"; |
2 |
> |
static const char RCSid[] = "$Id$"; |
3 |
|
#endif |
6 |
– |
|
4 |
|
/* |
5 |
|
* vgaimage.c - driver for VGA board under DOS |
6 |
|
*/ |
7 |
|
|
8 |
+ |
#include <stdio.h> |
9 |
+ |
|
10 |
|
#include "standard.h" |
11 |
|
#include <graph.h> |
12 |
|
#include "color.h" |
72 |
|
|
73 |
|
extern BYTE clrtab[256][3]; /* global color map */ |
74 |
|
|
75 |
< |
extern long ftell(); |
75 |
> |
static gethfunc headline; |
76 |
|
|
77 |
|
|
78 |
|
main(argc, argv) |
81 |
|
{ |
82 |
|
extern char *getenv(), *fixargv0(); |
83 |
|
char *gv; |
85 |
– |
int headline(); |
84 |
|
int i; |
85 |
|
|
86 |
|
progname = argv[0] = fixargv0(argv[0]); |
87 |
< |
if ((gv = getenv("GAMMA")) != NULL) |
87 |
> |
if ((gv = getenv("DISPLAY_GAMMA")) != NULL) |
88 |
|
gamcor = atof(gv); |
89 |
|
|
90 |
|
for (i = 1; i < argc; i++) |
145 |
|
} |
146 |
|
|
147 |
|
|
148 |
< |
headline(s) /* get relevant info from header */ |
149 |
< |
char *s; |
148 |
> |
static int |
149 |
> |
headline( /* get relevant info from header */ |
150 |
> |
char *s, |
151 |
> |
void *p |
152 |
> |
) |
153 |
|
{ |
154 |
|
char fmt[32]; |
155 |
|
|
159 |
|
formatval(fmt, s); |
160 |
|
wrongformat = strcmp(fmt, COLRFMT); |
161 |
|
} |
162 |
+ |
return(0); |
163 |
|
} |
164 |
|
|
165 |
|
|
381 |
|
cvals[ourblack] = _BLACK; |
382 |
|
cvals[ourwhite] = _BRIGHTWHITE; |
383 |
|
for (i = 0; i < maxcolors; i++) |
384 |
< |
cvals[i+minpix] = clrtab[i][BLU]<<14 & 0x3f0000L | |
384 |
> |
cvals[i+minpix] = (long)clrtab[i][BLU]<<14 & 0x3f0000L | |
385 |
|
clrtab[i][GRN]<<6 & 0x3f00 | |
386 |
|
clrtab[i][RED]>>2; |
387 |
|
_remapallpalette(cvals); |