version 1.9 | | version 1.10 |
---|
| | |
/* | | /* |
* static char *rcsid_xutil_c = | | * static char *rcsid_xutil_c = |
* "$Id: xutil.c,v 1.9 2002/04/24 06:31:48 mwedel Exp $"; | | * "$Id: xutil.c,v 1.10 2002/05/20 03:11:49 mwedel Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
} | | } |
| | |
| | |
| | #define IMAGE_BUF 65536 |
| | |
/* | | /* |
* ReadPixmaps(): When color pixmaps are used instead of fonts, this function | | * ReadPixmaps(): When color pixmaps are used instead of fonts, this function |
* does the actual reading of pixmap-file. This function is based largely on | | * does the actual reading of pixmap-file. This function is based largely on |
| | |
Window root = RootWindow (gdisp,DefaultScreen(gdisp)); | | Window root = RootWindow (gdisp,DefaultScreen(gdisp)); |
int use_private_cmap=0,num, compressed, len,i; | | int use_private_cmap=0,num, compressed, len,i; |
FILE *infile; | | FILE *infile; |
char *cp, databuf[HUGE_BUF], filename[MAX_BUF]; | | char *cp, databuf[IMAGE_BUF], filename[MAX_BUF]; |
#ifdef IMAGE_TIME_LOAD | | #ifdef IMAGE_TIME_LOAD |
time_t start_time = time(NULL); | | time_t start_time = time(NULL); |
#endif | | #endif |
| | |
/* Skip accross the number data */ | | /* Skip accross the number data */ |
for (cp=databuf+6; *cp!=' '; cp++) ; | | for (cp=databuf+6; *cp!=' '; cp++) ; |
len = atoi(cp); | | len = atoi(cp); |
if (len==0 || len>HUGE_BUF) { | | if (len==0 || len>IMAGE_BUF) { |
LOG(llevError,"ReadImages: length not valid: %d\n%s", | | LOG(llevError,"ReadImages: length not valid: %d\n%s", |
len,databuf); | | len,databuf); |
abort(); | | abort(); |