home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
GRIPS 2: Government Rast…rocessing Software & Data
/
GRIPS_2.cdr
/
dos
/
seq
/
src
/
paload9.c
< prev
next >
Wrap
C/C++ Source or Header
|
1990-01-07
|
888b
|
53 lines
/* paload
*
* Load a palette file into the display device
*
* Tim Krauskopf July 1986
*
* National Center for Supercomputing Applications, University of Illinois
* 153 Water Resources Building
* 605 E. Springfield Ave.
* Champaign, IL 61820
* (217) 244-0072
*
* this version: no 9 revolution display
*
*/
#include "stdio.h"
char rmap[256],bmap[256],gmap[256];
FILE *fp;
main(argc,argv)
int argc;
char *argv[];
{
register i;
if (argc < 2) {
printf("\n Usage: %s file \n",argv[0]);
exit(1);
}
if (NULL == (fp = fopen(argv[1],"rb"))) {
puts("Error on palette file open ");
exit(2);
}
for (i=0; i < 256 ; i++) {
fread(rmap,1,256,fp);
fread(gmap,1,256,fp);
fread(bmap,1,256,fp);
}
fclose(fp);
putmap(rmap,gmap,bmap);
}