home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Black Box 4
/
BlackBox.cdr
/
archiver
/
peek_221.arj
/
LOADCLRS.C
< prev
next >
Wrap
Text File
|
1992-01-25
|
707b
|
36 lines
#include "peeker.h"
extern char buffer[256];
extern char *home_dir;
extern int colors[];
extern char * pascal myfgets (char *buf,size_t len,int handle);
void pascal load_colors (void) {
char *fn;
int handle,x;
fn = searchpath("PEEKER.CLR");
if(!fn) {
fn = buffer;
sprintf(buffer,"%sPEEKER.CLR",home_dir);
}
handle = _open(fn,O_RDONLY | O_NOINHERIT | O_BINARY);
if(handle != -1) {
if(myfgets(buffer,255,handle)) {
fn = buffer;
for(x = 0;x < MAXCOLORS;x++) {
if(atoi(fn)) colors[x] = atoi(fn);
fn = strchr(fn,' ');
if(!fn) break;
while(*fn == ' ') fn++;
}
}
_close(handle);
}
}